React—05—脚手架
使用npm全局下载create-react-app, 建议node>16。
npm install create-react-app -g;
然后创建项目即可。
create-react-app 项目名称
但是现在create-react-app有问题,有些库依赖的react18但是这个脚手架创建的默认是react19,而官方还没解决这个问题,建议用vite创建一个react脚手架项目吧。
使用npm全局下载create-react-app, 建议node>16。
npm install create-react-app -g;
然后创建项目即可。
create-react-app 项目名称
但是现在create-react-app有问题,有些库依赖的react18但是这个脚手架创建的默认是react19,而官方还没解决这个问题,建议用vite创建一个react脚手架项目吧。