1.0.4 • Published 5 months ago

react-deck-link v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

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
1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago