Replies: 3 comments 3 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.
1 reply
-
FYI this has been moved from |
Beta Was this translation helpful? Give feedback.
1 reply
-
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.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 (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