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. For editing and updating the underlying UI config on the fly.

Import

1import { useUiConfig } from "@account-kit/react";

Usage

1import { useUiConfig } from "@account-kit/react";
2
3const { illustrationStyle, auth } = useUiConfig(
4 ({ illustrationStyle, auth }) => ({ illustrationStyle, auth })
5);

Parameters

selector

(state: UiConfigStore) => T

  • An optional function to select specific parts of the UI config state. ref

Returns

T

  • The selected state passed through the selector function or the entire state if no selector is provided