You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to set a cached locale value using server-only-context that is used to get the correct translations.
To my surprise the page component is called before the root layout, so the correct value is not yet applied.
Why is that?
Additional information
Operating System:
Platform: darwin
Arch: arm64
Version: DarwinKernelVersion23.2.0: WedNov1521:55:06PST2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6020Availablememory(MB): 16384
Available CPUcores: 12
Binaries:
Node: 20.10.0
npm: 10.2.3
Yarn: N/A
pnpm: 8.15.2
Relevant Packages:
next: 14.1.1-canary.74// Latest available version is detected (14.1.1-canary.74).eslint-config-next: 14.0.4
react: 18.2.0react-dom: 18.2.0
typescript: 5.3.3Next.js Config:
output: N/A
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I'm trying to set a cached locale value using
server-only-contextthat is used to get the correct translations.To my surprise the page component is called before the root layout, so the correct value is not yet applied.
Why is that?
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions