You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

adom-client

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adom-client

Adom client library

0.3.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

adom-client

Adom client library

Adom Wrapper

Create an adom wrapper component.

import { AdomClient, AdomProvider, ThemeProvider } from 'adom-client';
const adomClient = new AdomClient(<ADOM_DOCKER_HOST>, <ADOM_DOCKER__PORT>);

const AdomWrapper = ({children}) => {
    return(
        <ThemeProvider>
            <AdomProvider client={adomClient}>
                {children}
            </AdomProvider>
        </ThemeProvider>
    )
}

Use adom context

Get context of AdomProvider

import { useAdom } from 'adom-client';

const AssistedContainer = ({children}) => {
    const adomContext = useAdom();
    return (
        <Assisted>
            <React.Fragment>
                {!!adomContext.initialize &&
                    <button onClick={init}>
                        Start call
                    </button>
                }
                <button onClick={hangUp}>
                    Hang up
                </button>
                {!!adomContext.peerID &&
                    <div>
                        PEER_ID => {adomContext.peerID}
                    </div>
                }
            </React.Fragment>
        </Assisted>
    )
}

Guide to create react library

https://hackernoon.com/creating-a-library-of-react-components-using-create-react-app-without-ejecting-d182df690c6b

Develop library locally

  • On root folder launch these commands: npm run build
    npm link
  • Use this linked library in other project: npm link adom-client

This project was bootstrapped with Create React App.

FAQs

Package last updated on 04 Jul 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.