ParaProvider component sets up the Para context for your React Native app, making all Para hooks available to any component in the tree. It handles client initialization, session persistence via AsyncStorage, and React Query integration.
Import
Usage
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 usinguseParaStatus():
With Event Callbacks
Receive lifecycle events like login, logout, and signing:With Custom Storage
By default,ParaProvider persists session data using @react-native-async-storage/async-storage. You can provide your own storage adapter to use a different backend (e.g. SecureStore, MMKV, or an encrypted store):
Props
| Prop | Type | Required | Description |
|---|---|---|---|
paraClientConfig | ParaMobile | { apiKey: string; env?: Environment; opts?: ConstructorOpts } | Yes | A pre-instantiated ParaMobile, or a config object with your API key. |
config | { appName: string; rpcUrl?: string } | Yes | Provider configuration. |
callbacks | CoreCallbacks | No | Event callbacks (onLogin, onLogout, onSignMessage, etc.). |
storageAdapter | ParaStorageAdapter | No | Custom storage adapter. Defaults to AsyncStorage. |
waitForReady | boolean | No | When true (default), children are not rendered until the SDK is ready. Set to false to render immediately. |
fallback | ReactNode | No | Content to render while the SDK is initializing. Only used when waitForReady is true. |
children | ReactNode | Yes | Your app’s component tree. |