CDP Frontend SDK
    Preparing search index...

    Function 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.

      Parameters

      • props: CDPHooksProviderProps

        The component props

        Props for the CDP Provider component

        • children: ReactNode

          React children to be rendered within the provider

        • config: Config

          Configuration object for initializing the CDP SDK

      Returns Element

      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>
      );
      }