React之react-redux学习日志

redux官方中文文档:https://www.redux.org.cn/docs/introduction/CoreConcepts.html

1. Redux工作流程图:

2. redux三大原则:

1. 单一数据源:在Redux中有且只能有一个 state 仓库

2. State是只读的: state仓库的数据只能读取,不能进行修改

3. 使用纯函数执行修改:reducer中,应该返回一个纯函数,函数接受先前的 state和action, 然后返回一个新的 state

待续。。。。。。。

猜你喜欢

转载自www.cnblogs.com/jingxuan-li/p/12439181.html