-
-
Notifications
You must be signed in to change notification settings - Fork 46.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internationalization throws hydration error in Next.js #36011
Comments
Modal has same issue: #35351 |
Hello @bwmirek. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. We appreciate your effort in advance and looking forward to your contribution! 你好 @bwmirek,我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支(新特性发到 feature 分支,其他发到 master 分支),务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献。 |
in React17.0.2, this issue will be occured if use |
@bwmirek did you find a workaround for that !? I mean, it still happens on "next": "12.2.4" For anyone that comes here in the future. I was able to solve it by changing 'antd/es/locale/pt_BR' to 'antd/lib/locale/pr_BR' |
Got the same error but for the modal issue (next.js 13.1.0). |
Im getting this error when we render page with a Modal open by default. What is the fix for not getting this error? |
Have you tried |
I tried it, same behavior |
I use page router, and I resolve it by using In
In
But I'm confused since |
Reproduction link
https://github.com/bwmirek/antd-nextjs-locale-bug
Steps to reproduce
Reproduction repo:
New project
What is expected?
Component should be rendered the same way both on the server and the client.
What is actually happening?
Component is rendered differently on the server than the client, causing hydration error: "Hydration failed because the initial UI does not match what was rendered on the server".
Next.js version: 12.1.6, may be related to SSR.
The text was updated successfully, but these errors were encountered: