useSettings
const settings: AppSettings = useSettings();
useSettings
returns the configuration object that is passed as a prop to <App/> (generally defined in src/settings.ts)
Example
Get the content of settings.ts inside a page
- Use Settings
- settings.ts
- 👁 Preview
examples/cra-examples/src/settings/UseSettingsPage.tsx
loading...
examples/cra-examples/src/settings.ts
loading...
Documentation
Inputs
No input.
Outputs
Variable | Type | Description |
---|---|---|
settings | AppSettings | the whole configuration object that generally defined in src/settings.ts Note: This object is frozen and can't be updated |