CDP Frontend SDK
    Preparing search index...

    Function useAppConfig

    • Hook to access the app config from a component.

      Returns AppConfig

      The app config.

      const MyComponent = () => {
      // Access the app config from a child component
      const appConfig = useAppConfig();
      return <div>{appConfig.name}</div>;
      }

      function App() {
      return (
      <CDPReactProvider config={CDP_CONFIG} app={appConfig}>
      <MyComponent />
      </CDPReactProvider>
      );
      }