创建React结构
更改新创建的React App文件夹结构
create-react-structure
了解每个步骤
删除src文件夹
rm -r src
创建src并导航到其中
mkdir src && cd src
创建App.js和index.js
touch App.js index.js
创建所需的文件夹
mkdir assets config components hooks pages routes
为每个文件夹创建index.js文件
touch assets/index.js config/index.js components/index.js hooks/index.js pages/index.js routes/index.js
写入index.js文件的内容
echo import React from "react"; ^ import ReactDOM
评论0
最新资源