基于 react+antd+react-router+redux 搭建的,项目常用组件封装的项目,有利于快速拷贝过去使用 a
项目进度和计划情况需要查看 issue 区。
-
基础架构
-
最基本 UI 组件
-
基本目录、代码编写规范
-
用户登录,退出功能
-
项目需要常用功能集成
- 路由
- 本地化
- 国际化支持
- 网络请求
- mockjs
- 状态管理器 react-redux
- 所有组件,page 的名字首字母开始大写
- 平常的所有文件,目录名采用驼峰命名
- 所有变量,方法名用驼峰命名法起名
> simple-example_code ->> simpleExampleCode
vscode 插件 : vsc-commitizen
yarn add -g commitizen
commitizen init cz-conventional-changelog --yarn --dev --exact
提交代码用 git cz 来替代 git commit
最新的在顶部
-
ui 库 antd
$ yarn add antd
-
高级配置
不在 eject 的前提下修改 cra 默认配置
$ yarn add react-app-rewired customize-cra $ yarn add babel-plugin-import
按照 antd 官方的配置指南做的配置,可以参考一下链接 高级配置 高级配置
-
路由
$ yarn add react-router-dom
react-router 官网 react-router
-
状态管理器
yarn add redux react-redux redux-thunk
-
网络请求
yarn add axios
-
业务国际化
yarn add react-intl
-
数据本地保存
yarn add localforageyarn add storeyarn add store2
-
开发
yarn start // npm run start
-
生产编译
yarn run build // npm run build