FanfareProvider and ExperienceWidget.
Install
react, react-dom, and motion.
Add the provider
FanfareProvider initializes the core SDK, restores the local session by default, and provides the SDK to hooks and components below it.
Render the full widget
checkoutUrl for default granted-state navigation.
Use onGranted when your application needs to coordinate custom routing or server handoff.
Build custom React UI
UseuseExperienceJourney when you want React state and lifecycle handling without the default widget layout.
useExperienceJourney is the React-friendly wrapper around the underlying
journey stores. It subscribes to the current view$ and snapshot$ values for
you, updates React state when they change, and cleans up those subscriptions
when the component unmounts. Most React UI should render from the returned
view instead of subscribing to journey.view$ directly.