跳到内容

特性

我们询问了受访者对 28 个不同特性的看法,从无处不在的 Hooks(如 useState)到更小众的 API(如 useDeferredValue)。记得尝试按 "sentiment" 排序!

这张图表总结了调查中所有的特性问题。主要条形图代表受访者的经验;它们进一步细分为受访者的感受。你可以更改分组以在两者之间切换。

通过...分组:

根据此项排序:

1

99%
11,033
2

98.7%
11,063
3

97.5%
12,637
4

93%
5.5%
11,029
5

90.6%
7.9%
11,073
6

86.1%
11.6%
11,033
7

85.4%
11.1%
3.5%
12,766
8

85.3%
11.6%
3.2%
11,090
9

73.4%
20.5%
6.1%
12,584
10

68.3%
19.5%
12.3%
12,632

经验

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

情绪(态度)

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

主要 API 的痛点

您在使用上述 API 时遇到过哪些痛点?
(自由提问)

在最常用的 React API 中,forwardRef 是给开发者带来最多痛点的,紧随其后的是 memo。幸运的是,React 团队正在推出更好的替代方案。

0%
13%
25%
38%
50%
63%
1

2

3

Context API

匹配“Context API”的答案 331
4

5

Excessive complexity

6

7

State management

8

Performance

9

Double rendering

10

11

其他答案

匹配“其他答案”的答案 986
0%
13%
25%
38%
50%
63%
受访者百分比
我们邀请了 React 社区的成员分享他们的"年度之选"

我的 2023 年度之选: Zustand

简单、优雅、可扩展的状态管理,"就是好用"(TM)。如今,你可能不需要状态管理,但如果你需要,Zustand 是一个很好的起点。
我们邀请了 React 社区的成员分享他们的"年度之选"

Jack Herrington

首席工程师和 YouTuber
您在使用 hooks 时遇到过哪些痛点?
(自由提问)

不出所料,useEffectuseCallback 被认为是最有问题的 React hooks,主要是由于依赖数组的管理。

0%
14%
27%
41%
55%
68%
1

2

Dependency Arrays

3

4

5

State management

6

Excessive complexity

7

8

9

Excessive rerendering

10

11

其他答案

匹配“其他答案”的答案 771
0%
14%
27%
41%
55%
68%
受访者百分比

新 API 的痛点

您在使用新 API 时遇到过哪些痛点?
(自由提问)

虽然 React 能够不断发展并保持相关性是其最大的优势之一,但这也是有代价的,新的 API(如服务器组件)确实可能很难采用。

0%
18%
37%
55%
73%
92%
1

2

Excessive complexity

3

Next.js issues

4

5

form_issues

6

7

8

9

Lack of documentation

10

11

其他答案

匹配“其他答案”的答案 394
0%
18%
37%
55%
73%
92%
受访者百分比

30% 的受访者在参与调查时至少添加了一项内容到他们的阅读列表中,以便日后学习。这里是他们选择的内容明细。

0%
9%
19%
28%
37%
46%
1

1,777
2

1,720
3

1,591
4

1,387
5

1,381
6

1,279
7

1,256
8

1,238
9

1,231
10

1,098
0%
9%
19%
28%
37%
46%
受访者百分比
How many time each item was added to respondent's Reading List, a feature that lets people learn more about specific topics as they take the survey.
Be Productive with React.js, Today's Most Popular Framework
Brian Holt
SQLite Cloud

Be Productive with React.js, Today's Most Popular Framework

Gain experience building, testing, and maintaining high-performance client and server-side React applications.
A Tour of JavaScript & React Patterns
Lydia Hallie

A Tour of JavaScript & React Patterns

You’ll get an overview of more traditional design patterns with JavaScript, such as the Singleton and Proxy patterns. Then see React patterns such as the Hooks and Higher Order Component patterns.
感谢合作伙伴对我们的支持! 了解更多。