在浏览器进行快速渲染和无缝切换 React-Server

码农软件 · 软件分类 · React 开源项目 · 2019-04-28 09:12:22

软件介绍

React Server 实现 React 框架和服务器在浏览器中进行快速渲染和无缝切换

开始使用

最简单的开始使用方法是 yeoman generator

# install yeoman
npm install -g yo
# install the react-server generator
npm install -g generator-react-server
# make a new react-server project in the CURRENT directory
yo react-server
# run the new app
npm run start
# go to http://localhost:3000

为什么选择 react-server

当你真正使用 React 渲染服务端时,你很快真正碰上一堆问题,例如:

  • 我该如何从服务端为我的组件加载数据

  • 我该如何保证客户端和服务端加载相同的数据并且生成相同的 HTML 标记

  • 我该如何编写代码,让它既可以是由服务端生成并且成为单一页面程序的一部分?

  • 我该如何优化 JavaScript 和 CSS 间的传输

  • 我如何了解并遵循性能的最佳实践

  • 我如何保证我的站点能尽快地传输到浏览器

  • 我如何让我的 app 在后端具有高延迟高峰时能自动适应

React-Server 是为了使通用的 React 更容易写而设计的框架,也为这些或更多其他的问题提供了标准的答案。

本文地址:https://codercto.com/soft/d/4553.html

Hackers

Hackers

Steven Levy / O'Reilly Media / 2010-5-30 / USD 21.99

This 25th anniversary edition of Steven Levy's classic book traces the exploits of the computer revolution's original hackers -- those brilliant and eccentric nerds from the late 1950s through the ear......一起来看看 《Hackers》 这本书的介绍吧!

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具