You don't need to rewrite your app to start using React
你的应用并不会因为使用React而需要重写。
We recommend adding React to a small part of your application,
我们建议在你的应用中小部分的添加React,
such as an individual widget,
可以作为一个小挂件,
so you can see if it works well for your use case.
它是否在你的用例中运行良好。
While React can be used without a build pipeline, we recommend setting it up so you can be more productive.
虽然React可以在没有构建管道的情况下使用,但我们建议配置它,你可以提高开发效率。
A modern build pipeline typically consists of:
现代构建流水线通常包括:
- A package manager, such as Yarn or npm. It lets you take advantage of a vast ecosystem of third-party packages, and easily install or update them.
- 包管理器,如Yarn或npm。它允许您更多的使用第三方包的生态系统,并轻松地安装或更新它们。
- A bundler, such as webpack or Browserify. It lets you write modular code and bundle it together into small packages to optimize load time.
- 打包工具,例如webpack或Browserify。它允许您编写模块化代码,并将它们捆绑在一起成为小包以优化加载时间。
- A compiler such as Babel. It lets you write modern JavaScript code that still works in older browsers.
- 一个编译器例如Babel。它允许您编写的现代JavaScript代码可以在旧版本浏览器中工作。