Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redux简单的笔记 #24

Open
duxinyues opened this issue Mar 22, 2021 · 0 comments
Open

redux简单的笔记 #24

duxinyues opened this issue Mar 22, 2021 · 0 comments

Comments

@duxinyues
Copy link
Owner

将近半年没有写react了,关于redux状态什么的,感觉自己都忘得差不多,今天就做一个简单的回顾笔记吧!

redux的3个核心部分:

store,单一的数据源;
Reducer,作为一个函数,它负责对数据变化的分发和处理;
action,对数据变化的描述。

combineReducers:合并多个reducer函数,

compose:把接受到的函数从左到右进行组合




createStore:接受三个参数,分别是reducer、初始状态的内容和指定的中间件;




dispatch:将redux的三大要素串联起来【store、action和reducer】




reducer的本质是store的更新规则,明确了应用状态的变化是如何响应action并且发送到store。

[React-Redux的connect](http://qingzhuyue.cn/archives/716)

[redux、react-redux状态管理应用](http://qingzhuyue.cn/archives/1051)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant