Skip to content

ConfigSelector

ConfigSelector<TConfig, TSelected> = (config, state) => TSelected

Defined in: packages/react/src/types.ts:22

A pure function that selects a value from the current config. Used to optimize re-renders by only triggering updates when the selected value changes.

Example:

useConfig<MySettings, string>((config) => config.theme);

TConfig

The type of the configuration

TSelected

The selected value

TConfig

The entire config

ManagerState<TConfig>

The state of ConfigManager, typically not needed

TSelected

The selected value