[Typo]: useActionState reference page doesn't include `isPending` return, and is only used with forms
未关闭
还没有人认领这个 Issue。
type: typos
- 主要语言
- JavaScript
- 星标
- 11.8k
- 派生
- 7.9k
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 11
描述
Summary
Hello 👋
- useActionState should return
[state, formAction, isPending], not just[state, formAction] - The doc make it unclear if we can actually use this hook outside of a form, there are only examples about using it in a form and the second item in the return is
formAction, but the author of the hook specified it should not always be the case
Page
https://19.react.dev/reference/react/useActionState#returns
Details
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
打开 useActionState 参考页面,检查其中的 Returns 部分和基于表单的示例,然后将链接的 React PR 与预期的非表单行为进行比较。当返回值包含 isPending,并且页面清楚说明该 hook 是否可以在表单之外使用以及如何使用时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- javascript, react
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100