https://github.com/dreambo8563/ts_react_mobx
ts+react +mobx boilerplate
https://github.com/dreambo8563/ts_react_mobx
mobx3 react-router-v4 react16 typescript webpack3
Last synced: 3 months ago
JSON representation
ts+react +mobx boilerplate
- Host: GitHub
- URL: https://github.com/dreambo8563/ts_react_mobx
- Owner: dreambo8563
- Created: 2018-01-21T15:07:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-23T01:49:56.000Z (over 6 years ago)
- Last Synced: 2025-01-28T01:35:02.579Z (5 months ago)
- Topics: mobx3, react-router-v4, react16, typescript, webpack3
- Language: TypeScript
- Homepage:
- Size: 1.36 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
## Setup
```
$ npm install
```## Running
```
$ npm start
```## Build
```
$ npm run build
```## Rules:
全局 css /src/assets/main.css
## Router 命名规则
/系统/模块/页面../:id 等前面 3 层要确定,为了左侧导航能够相应变化
## 路由定义在
/src/app/routers
## store 定义
/src/app/stores
* AppStore 存储应用级别的数据 如 loading
* RouterStore 针对组件中需要应用路由是注入- 其他: 为需要进行组件通信时的页面级别数据
## 容器类组件
/src/app/containers
* 不同页面的最外层组件结构 同 系统 -> 模块 -> 页面如 sales -> orders -> List 页面
#layouts
存放大型布局的容器组件* SidebarLayout 所有系统内部要展示左侧导航的布局
## 组件库
/src/app/components
不同模块组件需建立自己的目录 如 Module1 下的 component1 建立 index.tsx 和 style.css
不同模块间通用组件直接放在 Common 目录下
## constants
* stores - store 名字
* text 所有文字 -便于以后国际化,统一处理
* api - 所有 api
* url - 路由地址相关## utils 帮助函数
* 请求相关
* loadComponentXXX 异步加载组件