Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svix-react

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svix-react

React components for using Svix in your dashboard.

  • 1.1.11
  • npm
  • Socket score

Version published
Weekly downloads
11K
decreased by-8.6%
Maintainers
1
Weekly downloads
 
Created
Source

Svix React

Installation

yarn add svix-react
# or
npm i svix-react

Usage

import React from "react";
import ReactDOM from "react-dom";
import { AppPortal } from "svix-react";

import "svix-react/style.css";

const SvixEmbed = () => {
  const svixAppId = 'app_x'; // this might vary from customer to customer

  const [appPortal, setAppPortal] = React.useState(null);
  const svixAppPortal = React.useEffect(() => {
    // Prerequisite: You'll need an endpoint that returns the App Portal 
    // magic URL (https://api.svix.com/docs#operation/get_dashboard_access_api_v1_auth_dashboard_access__app_id___post)
    fetch(`/your-backend-service/svix/${svixAppId}/app-portal`, { method: "POST" })
      .then(res => res.json())
      .then(result => setAppPortal(result));
  }, [svixAppId]);

  return (
    <AppPortal url={appPortal?.url} />
  );
};

const App = () => (
  <SvixEmbed />
);

ReactDOM.render(<App />, document.body);

Keywords

FAQs

Package last updated on 21 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc