通过 create-react-app 入门 React

作者: 前端大课堂 | 来源:发表于2019-01-20 16:15 被阅读0次

初学者可以通过 create-react-app 快速搭建 demo 入门,熟练者可以通过 create-react-app 分析源码和最新的特性。 

所以本文简单介绍 create-react-app 的入门使用。 

参考官网 create-react-app 的步骤: 

npx create-react-app my-app

cd my-app

npm start 

就可以启动本地服务,localhost:3000 就可以查看demo了。 

看起来脚手架生成的代码还是很清爽的, 

这个是demo的界面, 

后续其他文章,我会在 create-react-app 的基础上对react新功能做些介绍。 

总体上,create-react-app 还是很方便的,生成的代码该有的有,多余的代码例如打包什么的,都是透明的。 

相关文章

网友评论

    本文标题:通过 create-react-app 入门 React

    本文链接:https://www.haomeiwen.com/subject/mrvtjqtx.html