Skip to content
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

webpack+react #8

Open
binperson opened this issue Dec 28, 2017 · 0 comments
Open

webpack+react #8

binperson opened this issue Dec 28, 2017 · 0 comments

Comments

@binperson
Copy link
Owner

binperson commented Dec 28, 2017

什么会有服务端渲染

单页应用存在的问题

  • SEO不友好
  • 首次请求等待时间较长,体验不好

React中如何使用服务端渲染

react-dom是React专门为web端开发的渲染工具。我们可以在客户端使用react-dom的render方法渲染组件,而在服务端,react-dom/server提供我们将react组件渲染成HTML的方法

项目开发时的常用配置

常用配置
  • webpack dev server
  • Hot module replacement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant