JadeProvider component provides Jade SDK context to your application. Wrap your app with this provider to use Jade hooks.
Import
- React / Next.js
- React Native
Basic Usage
- React / Next.js
- React Native
Props
config
JadeClientConfig
required
Configuration object for the Jade client.
storage (React Native only)
StorageAdapter
Storage adapter for persisting data locally. Required for React Native to enable session persistence.
pauseOnBackground (React Native only)
boolean
default:"true"
Whether to pause streaming when the app goes to background.
Configuration Options
Async Authentication
- React / Next.js
- React Native
Organization Context
Custom Fetch Options (Web only)
Accessing the Client
Use the client hook to access the underlying client directly:- React / Next.js
- React Native
React Native-Specific Hooks
The React Native provider also exposes these additional hooks:useStorage
Get the storage adapter:useAppState
Get the current app state:Multiple Providers
You can use multiple providers for different configurations:TypeScript
Import types from the appropriate package:- React / Next.js
- React Native
Related
- Hooks Reference - Session and media hooks
- React Native Guide - Storage and app state