创建react应用程序
create-react-app
is a project aimed at getting you up to speed with React in no time. It provides a ready-made React application starter, so you can dive into building your app without having to deal with Webpack and Babel configurations.
create-react-app
是一个旨在立即使您熟悉React的项目。 它提供了一个现成的React应用程序启动器,因此您无需考虑Webpack和Babel配置就可以深入构建应用程序。
It provides out of the box:
它提供了开箱即用的功能:
- a development server with hot reloading 具有热重载的开发服务器
- provides a testing environment with Jest 用Jest提供测试环境
- allows to build the React app 允许构建React应用
- ready for ES6+ syntax 准备使用ES6 +语法
- bundles all your JavaScript and assets 捆绑您所有JavaScript和资产
- comes with CSS autoprefixer, SASS and CSS Modules support 带有CSS自动前缀,SASS和CSS模块支持
- and more! 和更多!
You start by using npx
, which is an easy way to download and execute Node.js commands without installing them. npx
comes with npm
(since version 5.2) and if you don’t have npm in