跳到内容

状态管理

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

状态管理的使用经验和感受

除了 useState,积极比率最高的状态管理解决方案是 Zustand。而虽然 Redux 仍然拥有庞大的用户群,但它并没有那么受欢迎。

通过...分组:

根据此项排序:

1

99%
11,033
2

80.5%
19%
9,911
3

55.2%
31.9%
12.9%
9,887
4

28.4%
42.5%
29.1%
9,894
5

17.8%
58.1%
24.1%
9,885
6

13.2%
39.7%
47.1%
9,887
7

10.7%
38.8%
50.5%
9,850
8

10.7%
49.2%
40.1%
9,866

经验

  • <span aria-hidden="true">🤓</span> 用过: 使用过此项目的受访者。
  • <span aria-hidden="true">👀</span> 有听说过: 听说过此项目,但没有使用过此项目的受访者。
  • <span aria-hidden="true">🤷</span> 没听说过: 从未听说过此项目的受访者。

情绪(态度)

  • 积极: 有兴趣了解此技术,或者愿意再次使用它的受访者
  • 中立: 未对此技术发表看法的受访者
  • 消极: 对此技术不感兴趣,或者使用此技术有糟糕体验的受访者

其他状态管理工具库

What other libraries have you used to manage state in your apps?
0%
8%
15%
23%
30%
38%
1

183
2

98
3

86
4

43
5

32
6

Signals

32
7

31
8

30
9

25
10

24
11

其他答案

289
0%
8%
15%
23%
30%
38%
受访者百分比
我们邀请了 React 社区的成员分享他们的"年度之选"

我的 2023 年度之选: Remotion

在 React 中创建程序化视频的想法继续让我着迷。Remotion 是一个相当低调的项目,它继续缓慢但稳定地增长,成功被开发者关系人员、教育工作者、独立创作者和大型公司(特别是 GitHub 的 Unwrapped 视频活动)采用。
我们邀请了 React 社区的成员分享他们的"年度之选"

State Management Pain Points

What pain points have you encountered related to state management?
(自由提问)
0%
13%
26%
39%
52%
65%
1

Redux issues

2

Excessive complexity

3

Excessive boilerplate

4

Global state management

5

Context API

匹配“Context API”的答案 37
6

MobX issues

7

8

Configuration

9

Debugging

10

Performance

0%
13%
26%
39%
52%
65%
受访者百分比
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.
感谢合作伙伴对我们的支持! 了解更多。