Client side hydration errors on first page render
OtisTemler opened this issue ยท 2 comments
OtisTemler commented
๐ Bug Report
When the client-page is opened directly with anything but not the fallback lang, there's a hydration error on the first page call. On refresh, the error is gone.
Running
console.log('Resolved lang', i18next.resolvedLanguage)
On the client-page/page.tsx, indicates that on the first server render, the resolved lang is en. Only after the first refresh, the server side render resolves correctly to de from the start.
To Reproduce
- Clone next-13-app-dir-i18next-example-ts
- npm run install
- npm run dev
- Put this url in your browser and hit enter: http://localhost:3000/de/client-page
Expected behavior
Should not output a hydration error.
Your Environment
- runtime version: Node 18 but tested also with Node 16
- i18next version: 23.0.1
- os: Mac
OtisTemler commented
Can confirm that fixes it.
Thanks a lot!!