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);Type Parameters
Section titled “Type Parameters”TConfig
Section titled “TConfig”TConfig
The type of the configuration
TSelected
Section titled “TSelected”TSelected
The selected value
Parameters
Section titled “Parameters”config
Section titled “config”TConfig
The entire config
ManagerState<TConfig>
The state of ConfigManager, typically not needed
Returns
Section titled “Returns”TSelected
The selected value