Provider component that initializes the CDP SDK and manages authentication state. This must be placed at the root of your application or above any components that need CDP functionality.
The component props
Props for the CDP Provider component
React children to be rendered within the provider
Configuration object for initializing the CDP SDK
A React context provider wrapping the children with CDP functionality
const cdpConfig = { projectId: "your-project-id" // Your project ID from the CDP Portal}function App() { return ( <CDPHooksProvider config={cdpConfig}> <YourApp /> </CDPHooksProvider> );} Copy
const cdpConfig = { projectId: "your-project-id" // Your project ID from the CDP Portal}function App() { return ( <CDPHooksProvider config={cdpConfig}> <YourApp /> </CDPHooksProvider> );}
Provider component that initializes the CDP SDK and manages authentication state. This must be placed at the root of your application or above any components that need CDP functionality.