Alpha
A React Hook for accessing a Journey's Model Block State and methods corresponding to an intent-based API for maniuplating said state.
import { useDopt } from '@dopt/react'; import { Modal } from '@your-company/modal'; export function Application() { const [{ active }, { complete }] = useDopt('HNWvcT78tyTwygnbzU6SW'); return ( <main> <Modal isOpen={active} title="👏 Welcome to your first journey!" footerItems={{ primaryActions: [{ label: 'Got it', onClick: complete }], }} > <Text> This is your onboarding experience! </Text> </Modal> </main> ); }
[Block, Methods] - The state of the Block for
the "Reference Id" for some Journey Model Block
Generated using TypeDoc
A React Hook for accessing a Journey's Model Block State and methods corresponding to an intent-based API for maniuplating said state.
Example
Returns
[Block, Methods] - The state of the Block for