Skip to main content
The ParaProvider component wraps your React application to provide access to Para hooks and manage the SDK instance.
ParaProvider includes an embedded ParaModal by default. Do not render another <ParaModal /> in the same provider tree unless you set config={{ disableEmbeddedModal: true }} and intentionally manage the separate modal yourself.

Import

Usage

Use the embedded modal in ParaProvider for the standard setup. Pass modal options through paraModalConfig instead of rendering a separate ParaModal:
If your app must render its own ParaModal, disable the embedded modal on the provider:

Loading State

By default, ParaProvider blocks rendering until the SDK is ready. You can customize this behavior:

With Fallback UI

Show a loading indicator instead of a blank screen while the SDK initializes:

With Immediate Rendering

Render children immediately and let them handle the loading state using useParaStatus():

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 ParaProvider must wrap any components that use Para hooks
  • It requires QueryClientProvider from React Query as a parent
  • Event callbacks receive events with a detail property containing data and optional error
  • The provider automatically manages session keep-alive unless disabled
  • The provider automatically renders the modal unless config.disableEmbeddedModal is set to true
  • By default, children are not rendered until the SDK is ready. Use fallback to show loading UI, or waitForReady={false} to render children immediately
  • All child components can access Para hooks without additional setup