react-deck-link
v1.1.3
Published
React SDK for integrating Deck Link
Readme
react-deck-link 
React 16.8+ hook and components for integrating with Deck Link
yarn add react-deck-linkUsage
import { useDeckLink } from 'react-deck-link';
const OpenLink = () => {
const { open, isError, isReady } = useDeckLink({
token: '<GENERATED_LINK_TOKEN>',
onSuccess: ({ job_guid, public_token }) => {
// send public_token to server
// persist job_guid
},
});
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 serverTo test a local version of this library:
yarn link
cd ../dashboard
yarn link react-deck-linkPublishing
npx vite build
yarn publish