React SDK for integrating Deck Link
npm install react-deck-linkReact 16.8+ hook and components for integrating
with Deck Link
``sh`
yarn add react-deck-link
`js
import { useDeckLink } from 'react-deck-link';
const OpenLink = () => {
const { open, isError, isReady } = useDeckLink({
token: '
onSuccess: ({ job_guid, public_token }) => {
// send public_token to server
// persist job_guid
},
});
if (isError) {
return
return (
);
}
`
Please refer to the official Deck Link docs
for a more holistic understanding of Deck Link.
This project is set up using Vite.
`sh`
yarn
npx vite # start dev server
To test a local version of this library:
`sh`
yarn link
cd ../dashboard
yarn link react-deck-link
`sh``
npx vite build
yarn publish