跳到内容

状态管理

用于管理应用程序状态的工具库。

状态管理随时间变化的比重

Zustand 证实了其在积极性方面的领先地位,只有默认的 useState 得分更高。在使用率方面,Zustand 也有所增长,在过去一年中从 28% 上升到 41%!

Jotai
MobX
Recoil
Redux
Redux Toolkit
useState
XState
Zustand
Effector

模式:

视图:

0%
20%
40%
60%
80%
100%
2023
2024
0%
20%
40%
60%
80%
100%

其他状态管理工具库

虽然 TanStack Query 以数据加载库而闻名,但它在管理结果状态方面也做得很好。

0%
20%
40%
60%
80%
100%
1

2

3

4

5

6

7

8

9

10

11

12

13

其他答案

匹配“其他答案”的答案 245
0%
20%
40%
60%
80%
100%
受访者百分比
What other libraries have you used to manage state in your apps?
(自由提问)
我们邀请 React 社区成员分享他们的"年度之选"

我的 2024 年度之选: CodeTV (formerly Learn with Jason)

杰森的使命是让编程对每个人来说都变得有趣且易于接触,他在这方面做得非常出色。在其中一个系列中,杰森和3名开发者面临挑战,需要根据简短的编程提示(如“构建一个排行榜”或“构建一个电子商务网站”)来创建应用程序。而他最新的系列是一个网页开发游戏秀,有点像《危险边缘》和《辣根一口》的混合体!
我们邀请 React 社区成员分享他们的"年度之选"

Shaundai Person

前端高级软件工程师(Netflix)和课程讲师

State Management Pain Points

状态管理作为一个整体仍然过于复杂,特别是 Redux 在受访者中受到的批评很大。

0%
20%
40%
60%
80%
100%
1

Excessive complexity

2

Redux issues

3

Excessive boilerplate

4

Excessive re-renderings

5

Global state management

6

Synchronization issues

7

Performance

8

9

Excessive verbosity

10

MobX issues

0%
20%
40%
60%
80%
100%
受访者百分比
What pain points have you encountered related to state management?
(自由提问)
Advanced Redux with Redux Toolkit
Steve Kinney
Temporal

Advanced Redux with Redux Toolkit

In this course, you'll use Redux Toolkit to simplify reducer logic and actions, use TypeScript with Redux, add tests, and use RTK Query to fetch data in real-world projects.
State Modeling in React with XState
David Khourshid
Microsoft

State Modeling in React with XState

In this course, we'll be learning to model state before we code using state machines and statecharts and then use those in our app to orchestrate complex app logic.
感谢合作伙伴对我们的支持! 了解更多。