react
差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
| react [2021/07/18 14:19] – admin | react [2021/10/20 17:38] (当前版本) – admin | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | ====== | + | ====== |
| - | * https://yarnpkg.com/getting-started/install | + | * https://zh-hans.reactjs.org/docs/faq-structure.html |
| - | <code bash> | + | |
| - | npm install | + | |
| - | </ | + | |
| ====== React App ====== | ====== React App ====== | ||
| 行 10: | 行 7: | ||
| <code bash> | <code bash> | ||
| - | yarn create react-app my-app --template typescript | + | npx create-react-app my-app --template typescript |
| </ | </ | ||
| + | |||
| + | ====== Craco ====== | ||
| + | * https:// | ||
| + | <code bash> | ||
| + | npm install @craco/ | ||
| + | </ | ||
| + | <code bash> | ||
| + | echo " | ||
| + | </ | ||
| + | <file javascript craco.config.js> | ||
| + | module.exports = {}; | ||
| + | |||
| + | </ | ||
| ====== React Router ====== | ====== React Router ====== | ||
| 行 17: | 行 27: | ||
| * https:// | * https:// | ||
| <code bash> | <code bash> | ||
| - | yarn add react-router-dom | + | npm install |
| + | </ | ||
| + | |||
| + | ====== prettier ====== | ||
| + | * https:// | ||
| + | <code bash> | ||
| + | npm install --save-dev --save-exact prettier | ||
| + | </ | ||
| + | <file json .prettierrc.json> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | ====== lint-staged ====== | ||
| + | * https:// | ||
| + | |||
| + | **需要提前安装 prettier --save-dev 或者 eslint --save-dev** | ||
| + | <code bash> | ||
| + | npx mrm@2 lint-staged | ||
| + | </ | ||
| + | |||
| + | ====== MUI ====== | ||
| + | * https:// | ||
| + | * https:// | ||
| + | <code bash> | ||
| + | npm install @mui/ | ||
| + | </ | ||
| + | |||
| + | ====== Form validator ====== | ||
| + | * https:// | ||
| + | * https:// | ||
| + | |||
| + | <code bash> | ||
| + | npm install --save react-hook-form @hookform/ | ||
| </ | </ | ||
| 行 24: | 行 70: | ||
| <code bash> | <code bash> | ||
| - | yarn add axios | + | npm install |
| + | </ | ||
| + | |||
| + | ====== Lodash ====== | ||
| + | * https:// | ||
| + | |||
| + | < | ||
| + | npm install --save lodash | ||
| + | </ | ||
| + | |||
| + | ====== date-fns ====== | ||
| + | * https:// | ||
| + | |||
| + | < | ||
| + | npm install date-fns --save | ||
| </ | </ | ||
react.1626589140.txt.gz · 最后更改: 2021/07/18 14:19 由 admin
