useUiConfig
A custom hook for accessing UI configuration from the UiConfigContext
. Allows optional selection of specific parts of the UI config state using a selector function.
Import
import { useUiConfig } from "@account-kit/react";
Usage
import { useUiConfig } from "@account-kit/react";
const { illustrationStyle, auth } = useUiConfig(
({ illustrationStyle, auth }) => ({ illustrationStyle, auth })
);
Parameters
selector
(state: UiConfigStore) => T
- An optional function to select specific parts of the UI config state
Returns
T
- The selected state passed through the selector function or the entire state if no selector is provided