Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7b2b7d9

Browse files
完善redux文档
1 parent 8b79d3b commit 7b2b7d9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎README.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,14 @@ const B = () => {
6666
`memo` 只会根据 `props` 判断是否需要重新渲染,和 `state``context` `无关,state``context` 发生变化时,组件依然会正常的进行重新渲染
6767

6868
- `useReducer` 可以优化复杂的 `state`
69+
70+
- redux 管理全局应用状态(redux 分支)
71+
使用步骤:
72+
73+
1. 引入 redux 核心包
74+
2. 创建 reducer 整合函数
75+
3. 通过 reducer 对象创建 store
76+
4. 对 store 中的 state 进行订阅
77+
5. 通过 dispatch 派发 state 的操作指令
78+
79+
- 使用 RTK 简化 redux 操作(RTK 分支)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /