react项目搭建【非全局安装create-react-app】
不想在电脑上面全局安装一个create-react-app 脚手架怎么办?也很简单,其实只要是你构建的react项目可以访问到create-react-app就行了
搭建一个根目录
mkdir react-root
cd react-root
npm init -y
npm i create-react-app
在react-root项目下构建react项目即可
npx create-react-app my-first-app
cd my-first-app
npm i
react项目目录截图