Framework Adapters
React
The React adapter provides a context-based provider and hooks that re-render automatically when the locale changes.
ts
import { PicoIntlProvider, useLocale, useT } from '@pico-intl-dev/react';
function Title() {
const t = useT();
const { dir } = useLocale();
return <h1 dir={dir}>{t('app.title')}</h1>;
} Key points
- Wrap the app with PicoIntlProvider.
- useT() returns a locale-reactive translate function.
- useLocale() returns locale, setLocale(), dir, and isRTL.
Next step
Copy the example into a small fixture, run the validation commands, and keep framework-specific routing, hydration, or SSR behavior covered by your app tests.