Skip to main content
function CDPHooksProvider(props: CDPHooksProviderProps): Element;
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.

Parameters

ParameterTypeDescription
propsCDPHooksProviderPropsThe component props

Returns

Element A React context provider wrapping the children with CDP functionality

Example

const cdpConfig = {
  projectId: "your-project-id" // Your project ID from the CDP Portal
}

function App() {
  return (
    <CDPHooksProvider config={cdpConfig}>
      <YourApp />
    </CDPHooksProvider>
  );
}