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
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. |
children | ReactNode | Yes | Your app’s component tree. |