React+DVA+Antd架构说明
2019-12-23 本文已影响0人
逸笛
参考文档:
ES6:http://es6.ruanyifeng.com/
React框架:
API: https://reactjs.org/docs/getting-started.html
生命周期:https://reactjs.org/docs/react-component.html
DVA脚手架:https://dvajs.com/guide/
Antd UI框架:https://ant.design/docs/react/introduce-cn
UmiJS(包含Antd+DVA,为目前最新使用框架): https://umijs.org
目录结构说明:
![](https://img.haomeiwen.com/i6619704/aa00f9cfefb55fc6.png)
数据流转说明:
![](https://img.haomeiwen.com/i6619704/dbf4f0b3ab61054f.png)
请求流程
UI 组件交互操作;
调用 model 的 effect;
调用统一管理的 service 请求函数;
使用封装的 request.js 发送请求;
获取服务端返回;
然后调用 reducer 改变 state;
更新 model