Skip to main content
function useAppConfig(): Required<AppConfig>;
Hook to access the app config from a component.

Returns

Required<AppConfig> The app config.

Example

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

function App() {
  return (
    <CDPReactProvider config={config}>
      <MyComponent />
    </CDPReactProvider>
  );
}
I