ParaProvider component wraps your React application to provide access to Para hooks and manage the SDK instance.
Import
Usage
Advanced Usage
With Event Callbacks
With Custom Para Instance
This can be useful if you need to use the Para instance outside of the React tree, i.e. in the callbacks on the ParaProvider.Notes
- The
ParaProvidermust wrap any components that use Para hooks - It requires
QueryClientProviderfrom React Query as a parent - The
ParaModalcomponent should be placed inside the provider - Event callbacks receive events with a
detailproperty containingdataand optionalerror - The provider automatically manages session keep-alive unless disabled
- All child components can access Para hooks without additional setup