01:React学习笔记:安装之hello world
按官方文档搭建一个react project
[文档地址:](https://zh-hans.reactjs.org/docs/add-react-to-a-website.html)
1. `在这里插入代码片`Create React App允许我们快速搭建一个基于react的单页面应用
2. 前提是电脑已经安装了Node >= 10.16 和 npm >= 5.6;
3. 快速生成项目
npx create-react-app my-app
cd my-app
npm start
4. 不出问题到这里你的页面应该有hello world 了
遇到的问题
1.跟着官网教程新建项目就报错,缺少了很多文件,原因可能是之前已经有同名的旧版本项目了,解决方法就是移除旧的,再创建新的
2.上代码
npm rm -g create-react-app,
create-react-app -V,
npm install create-react-app -g,
create-react-app my-app