1创建项目

1.npx create-react-app [project-name]

2.src下只保留app.js和index.js

3.选择性在pubilc/index里加入boostrap   ---去bootcdn下搜boostrap  选twitter  boostrap.min.css

4.加入redux    在src下的index文件中

npm i
redux react-redux redux-thunk redux-logger

 

yarn add customize-cra react-app-rewired --dev

cra的配置可看下面

https://www.cnblogs.com/zyl-Tara/p/10635033.html

https://www.cnblogs.com/lucy-xyy/p/14230692.html

在项目根目录中新建文件config-overrides.js文件

然后修改package.json文件如下,

+   "start": "react-app-rewired start",

yarn add eslint-config-prettier eslint-plugin-import eslint-plugin-prettier eslint-plugin-react  prettier babel-plugin-import --dev

posted @ 2020-12-23 17:43  燕子fly  阅读(53)  评论(0编辑  收藏  举报