创建React项目
// 进入需要创建项目的路径下,执行
npx create-react-app my-app
如下图,在test文件夹下创建一个名为demo的React项目:
静待安装,出现happy hacking即成功:
运行项目:
// 进入项目路径中,启动项目
cd demo
npm start
运行效果:
// 进入需要创建项目的路径下,执行
npx create-react-app my-app
如下图,在test文件夹下创建一个名为demo的React项目:
静待安装,出现happy hacking即成功:
运行项目:
// 进入项目路径中,启动项目
cd demo
npm start
运行效果: