react页面的控制台提示这个错误是怎么回事?

控制台:

**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) xxx.com/tfs/TB174YQeMDD8KJjy0FdXXcj
 (server) xxx.com/TB12hfKeLDH8KJjy1XcXXcp
warning @ index.js:8**
阅读 1.6k
1 个回答

做了服务端渲染吧,这是一个警告,大意是说你的客户端的渲染和服务端的渲染输出的组件的checksum这个东西输出不一致,应该是你渲染的组件在第一次render前做了什么操作

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题