-
-
Notifications
You must be signed in to change notification settings - Fork 50.6k
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
服务端渲染出现的警告:the checksum was invalid #2061
Comments
试试 1.3.2,如果没问题,那么可能是 #2030 造成的。 |
感谢回复,换成1.3.2后,还是出现同样的问题。 |
帮忙排查吧,我们没有场景可以重现,有明显问题就给 PR 吧~ |
建议直接给 PR |
closed in react-component/menu#55 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
我在使用and组件时,尝试了服务端渲染,使用了Menu组件,Chromium输出如下警告:
Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
(client) ria-owns="1466038873662_0" aria-haspopup
(server) ria-owns="1466038873358_0" aria-haspopup
组件代码如下:
服务端渲染出来的代码如下:
问题分析
服务端渲染出来的id="1466038873358_0",客户端渲染出的id="1466038873662_0",貌似这里的id是根据当前时间生成的,导致服务端和客户端生成的id不一致。
本地环境信息
The text was updated successfully, but these errors were encountered: