关于react服务器端渲染的几个问题,有点不清楚

服务器端渲染就是:服务端直接将数据填充好,生成 html 返回给浏览器
这个理解
后面呢?浏览器渲染好这些html加载完js之后呢?会又执行一遍react的声明周期吗?
还是react已经处理好了,不会重复componentWillmound?

阅读 1.2k
1 个回答
If you call ReactDOM.hydrate() on a node that already has this
server-rendered markup, React will preserve it and only attach event
handlers, allowing you to have a very performant first-load
experience.[1]

[1] https://reactjs.org/docs/reac...

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