useSetting
const setting: T = useSetting<T>(key: string);
useSetting returns a specific entry from Settings idenfified by key
Example
Get a property of settings.ts
- Use Setting
- settings.ts
- 👁 Preview
examples/cra-examples/src/settings/UseSettingPage.tsx
loading...
examples/cra-examples/src/settings.ts
loading...
Documentation
Inputs
Variable | Type | Description |
---|---|---|
key | string | The identifier of a field in the configuration object. |
Outputs
Variable | Type | Description |
---|---|---|
setting | T | a specific entry from Settings idenfified by key |