- App Router:
useTno longer re-renders on every URL change — it calleduseParams()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, includinghistory.replaceState/pushStateand search-param updates. Every component usinguseTre-rendered each time, even inlocaleInPath: falsemode where there is no such segment. The sync now lives in a single component insideI18nProviderthat renders nothing, anduseTis a typeduseTranslation. #2349 - App Router:
useTno longer breaksnext buildwithcacheComponents: true— that sync component only mounts in the browser, souseParams()is no longer called during server rendering. AuseTcaller on a route whose params are not all covered bygenerateStaticParamsused to fail the prerender with "useParams()in a Client Component outside of<Suspense>"; it now renders into the static shell. #2349