本项目基于 Reactseed 创建。
- 开发 :
npm start
- 测试 :
npm test
- 构建 :
npm run build
- 分析 :
npm run analyze
__name__
├── mock
├── public
├── src
│ ├── components
│ ├── configs
│ ├── constants
│ ├── hooks
│ ├── pages
│ │ ├── Playground
│ ├── routes
│ ├── service
│ ├── themes
│ ├── typings
│ ├── utils
│ ├── index.tsx
│ ├── react-app-env.d.ts
│ ├── react.d.ts
│ ├── reportWebVitals.ts
│ ├── router.tsx
│ ├── setupTests.ts
│ └── setupProxy.js
├── .cz-config.js
├── .env
├── .eslintignore
├── .eslint.js
├── .gitignore
├── .prettierrc
├── .stylelintrc
├── craco.config.ts
├── README.md
├── tsconfig.eslint.json
├── tsconfig.json
└── package.json
- 组件库:antd
- 标准库:core-js
- Hooks:react-use
- 数据请求:axios、axios-hooks
- 数据管理:zustand
- 错误捕获:use-error-boundary
项目内置了基础的 Hooks
,如下:
useRequest
:数据请求,建议根据业务进行调整useAppStore
:全局数据管理
项目内置了模块联邦配置,参考详情
- 新增远程模块更新
craco.config.ts
下remotes
配置 - 在
src/typings/remote.d.ts
手动声明远程模块类型