[Suggestion]: Add a note about the `use` API as an alternative to `useEffect`
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 68/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- javascript, react
调研方向
首先阅读 useEffect 页面中的“用于在 Effects 中获取数据的替代方案有哪些?”以及 use 页面中的“将数据从服务器流式传输到客户端”部分。阐明 useEffect 与 use 之间的关系,包括相关的权衡,并更新文档,使读者能够识别每种方法适用的场景。
由索引模型根据 Issue 内容生成。
描述
Summary
The section on the useEffect page about good alternative to fetching data is a great resource, but does not mention the use API at all. I recommend adding some text to clarify the existence of this option and any pros/cons.
Page
https://react.dev/reference/react/useEffect#what-are-good-alternatives-to-data-fetching-in-effects
Details
It is unclear from the documentation what the relationship between useEffect and use is. The useEffect page does not mention the use API at all, and neither does the use page. The useEffect page contains a section called “Fetching data with Effects”, and the use page contains a section called Streaming data from the server to the client. So, it sounds like both can be used for fetching data, but there is no acknowledgement of this or relevant guidance.
- 主要语言
- JavaScript
- 星标
- 11.8k
- 派生
- 7.9k
- 平均合并
- 16 小时 6 分钟
- 30 天内合并 PR
- 7
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
reactjs/react.dev 的其他 Issue
-
type: documentation
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 1/5 1 小时以内 新手友好度 82/100
-
bug: unconfirmed
难度 2/5 1-3 小时 新手友好度 74/100
-
type: typos
难度 1/5 1 小时以内 新手友好度 90/100
-
bug: unconfirmed
难度 2/5 1-3 小时 新手友好度 68/100
查看 reactjs/react.dev 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
avniproject/avni-client#2135 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
难度 2/5 1-3 小时 新手友好度 72/100
bevyengine/bevy-website#2595 ·
-
ecosystem wording
难度 1/5 1 小时以内 新手友好度 90/100
matrix-org/matrix.org#3649 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
vadimdemedes/ink#1029 ·