[React] Set up React apps with zero configuration
The React team has an official Command Line Interface (CLI) for building React projects called "Create React App"; in this lesson, we show how to use this tool to quickly set up new projects using the create-react-app {project-name}
command. We then use the npm scripts that are provided: npm start
to develop, npm run build
to ship, and npm run eject
to opt out of the abstracted tooling.
The benefits of this tool are:
- It's officially maintained by the React team; this means best practices out of the box
- Zero config, one dependency
- Config is abstracted so React team can make improvements under the hood and you get the new goodness for free
- Clean command line output for errors
- You can "eject" at any time if needed
Install:
npm install -g create-react-app
Create a new app:
create-react-app react-start
Remove react-scripts:
npm run eject
This will remove the react-script and back to normal.
相关文章
- Map和Set的区别_list与set的区别
- JS 中的 (Weak)Set 和 (Weak)Map
- 一文搞清楚ES6新增数据结构 Symbol Map WeakMap Set WeakSet
- 【C++】map 和 set
- WordPress 教程:使用 wp_set_post_terms 给文章设置分类和标签信息时参数的注意事项
- ORA-19801: initialization parameter DB_RECOVERY_FILE_DEST is not set ORACLE 报错 故障修复 远程处理
- ORA-29323: ALTER DATABASE SET COMPATIBILITY command not supported by string ORACLE 报错 故障修复 远程处理
- ORA-29324: SET COMPATIBILITY release string format is wrong ORACLE 报错 故障修复 远程处理
- MySQL Error number: MY-013823; Symbol: ER_GRP_RPL_ERROR_SET_MULTI_CONSENSUS_LEADER; SQLSTATE: HY000 报错 故障修复 远程处理
- Android旋转动画rotate动画,xml配置set实现详解手机开发
- React 许可证虽严苛,但不必过度 react
- 元素解锁Redis之旅: 从Set元素中取值(redis取set)
- 探索React框架中MySQL数据库的应用(react mssql)
- MySQL中SET集合的使用方法及注意事项(mysql中set集合)
- MySQL中如何使用SET (mysql中set @)
- 探究Redis的SET命令的功能与用法(查看redis命令set)
- Redis集群高效使用Set命令(redis集群set命令)
- serveroutputOracle中如何设置ServerOutput(oracle 中 set)
- 关于php程序报date()警告的处理(date_default_timezone_set)