react-deck-link
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

react-deck-link npm version

React 16.8+ hook and components for integrating with Deck Link

yarn add react-deck-link

Usage

import { useDeckLink } from 'react-deck-link';

const OpenLink = () => {
  const { open, isError, isReady } = useDeckLink({
    token: '<GENERATED_LINK_TOKEN>',
    onSuccess: (public_token, metadata) => {
      // send public_token to server
    },
  });

  if (isError) {
    return <div>Uh oh!</div>;
  }

  return (
    <button onClick={open} disabled={!isReady}>Connect</button>
  );
}

Documentation

Please refer to the official Deck Link docs for a more holistic understanding of Deck Link.

Contributing

This project is set up using Vite.

yarn
npx vite # start dev server

To test a local version of this library:

yarn link
cd ../dashboard
yarn link react-deck-link

Publishing

npx vite build
yarn publish

Readme

Keywords

Package Sidebar

Install

npm i react-deck-link

Weekly Downloads

191

Version

1.0.4

License

MIT

Unpacked Size

6.92 kB

Total Files

8

Last publish

Collaborators

  • deckdevweb