npm install @plandalf/plandalf-react-js
yarn add @plandalf/plandalf-react-js
pnpm add @plandalf/plandalf-react-js
import { PlandalfProvider } from "@plandalf/plandalf-react-js"; function App(props) { return ( <PlandalfProvider agent={props.jwt_token}> <MyApplication /> </PlandalfProvider> ) }
usePlandalf
import { usePlandalf } from "@plandalf/plandalf-react-js"; function MyApplication () { const plandalf = usePlandalf(); if (plandalf.isWorkflowActive('my_workflow')) { return <MyOldPaywall/> } return ( <MyComponent/> ) }