Replies: 5 comments 4 replies
-
This API does not work for me currently in 15 latest canary. It simply returns {} for every page its called in |
Beta Was this translation helpful? Give feedback.
-
FYI this has been moved from |
Beta Was this translation helpful? Give feedback.
-
on next 15.5.0, current api can await a value, but import { locale } from 'next/root-params';
const localeValue = await locale(); // `localeValue` type is any i wonder how to add types in the future, |
Beta Was this translation helpful? Give feedback.
-
We just shipped triptojapan.com with root params. The code cleanup is great and we are finally using The only issue we ran into was in preview environments. In |
Beta Was this translation helpful? Give feedback.
-
We also shipped https://nordicdownhillseries.com with root params. Works excellent! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
With
rootParams
being available in the latest canary release of Next.js, I'd be curious how this feature is working for users ofnext-intl
that have already decided to give it a shot!My impression so far has been positive, these are my findings.
Bugs/missing:
Client-side navigations within a given segment value will returnFixed in Next.js 15.2!undefined
for the root param value if you have multiple root layouts (ref)I couldn't get global 404 pages to work (ref)→ Should be fixed by [not-found] Add global-not-found convention vercel/next.js#78783 (comment)(fixed in feat: handle rootParams in routes (finish changes) vercel/next.js#81086)rootParams
return an empty object in Route HandlersrootParams
, butdynamicParams = false
might not trigger a 404 in production if you're using dynamic APIs on the page (generateStaticParams with dynamicParams false does not show not-found page on production vercel/next.js#54270)Nice-to-have:
Let me know if
rootParams
works well for your app!Update: It seems like
rootParams
is renamed tonext/root-params
.Beta Was this translation helpful? Give feedback.
All reactions