参考了阮一峰老师的文章
combineReducers
Usage
1 | const { combineReducers } from 'redux'; |
- 方便管理 reducer,可以按内容分类 reducer
- reducer 数据也独立,每个 reducer 所能获取和修改的 state 都是独立的。
- 获取数据应该要通过 state.xxx.yyy。
- 当然要跟着修改的地方就是 mapStateToProps 了。
参考了阮一峰老师的文章
1 | const { combineReducers } from 'redux'; |
原文作者:Maple
原文链接:https://blog.vvcat.cn/2018/05/13/2019/07/react-reudx-note-new-md/
发表日期:May 13th 2018, 11:51:01 pm
更新日期:January 9th 2024, 12:20:32 am
版权声明:本文采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可