Suggest improving hook API reference signatures
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 11.8k
- フォーク
- 7.9k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 11
説明
A user on Reddit pointed out that the Hooks API Reference page section for useEffect doesn't include the deps array in the signature - it's just useEffect(callback). The deps array is only described later on under the heading "Conditionally Firing an Effect".
Similarly, the entry for useLayoutEffect() doesn't even show a signature at all - it just says "the signature is identical to useEffect".
At a minimum, the useEffect signature should show that there's an optional second argument - the deps array. It would also help to show the signature for useLayoutEffect as well.
Reddit link reference: https://www.reddit.com/r/reactjs/comments/b0oh20/usedimensions_a_react_hook_to_measure_dom_nodes/eigiqud/
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Hooks API Reference ページから始め、useEffect と useLayoutEffect の項目を確認します。useEffect にオプションの deps 配列が表示され、useLayoutEffect に明示的なシグネチャがあり、周囲の説明の整合性が保たれていれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100