github i18next/next-i18next v16.3.2

5 hours ago
  • App Router: useT no longer re-renders on every URL change — it called useParams() to sync the language from a [lng]/[locale] segment, and that subscribes the caller to the router's params, which Next replaces on every URL change, including history.replaceState/pushState and search-param updates. Every component using useT re-rendered each time, even in localeInPath: false mode where there is no such segment. The sync now lives in a single component inside I18nProvider that renders nothing, and useT is a typed useTranslation. #2349
  • App Router: useT no longer breaks next build with cacheComponents: true — that sync component only mounts in the browser, so useParams() is no longer called during server rendering. A useT caller on a route whose params are not all covered by generateStaticParams used to fail the prerender with "useParams() in a Client Component outside of <Suspense>"; it now renders into the static shell. #2349

Don't miss a new next-i18next release

NewReleases is sending notifications on new releases.