---
id: react/api/use-config
title: useConfig
---

The frozen effective config — locales, units, currencies, detection order — for components that need to read settings without subscribing to state.

```tsx
useConfig(): Readonly<StiftRuntimeConfig>
```

No arguments, no subscription. The object is frozen at boot; reading it never re-renders, so it is safe in hot paths and outside reactive contexts that only need static lists.

## Returns

The normalized runtime config: `locales.supported` (the typed locale union — build switchers from this, never a hardcoded list), `currencies`, unit categories, detection order, and everything `stift.config.ts` declares, resolved with defaults.

## Examples

```tsx
function LocaleSwitcher() {
  const supported = useConfig().locales.supported
  const { locale, setLocale } = useLocale()
  return (
    <select value={locale} onChange={(e) => setLocale(e.target.value)}>
      {supported.map((l) => (
        <option key={l} value={l}>{l}</option>
      ))}
    </select>
  )
}
```

## Next

- Writing the config → [stift.config.ts](../../configuration/config-file.md)
- Reactive locale state → [`useLocale`](./use-locale.md)
