[Typo]: explanation of useMemo first-render return value, doesn't make logical sense
オープン
まだ誰も着手していません。
type: typos
- 主要言語
- JavaScript
- スター
- 11.8k
- フォーク
- 7.9k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 11
説明
Summary
Inconsistent explaining on what useMemo returns on first render.
Page
https://react.dev/reference/react/useMemo#reference
Details
From article, in order:
On the initial render, useMemo returns the result of calling calculateValue with no arguments.
On the initial render, the value you’ll get from useMemo will be the result of calling your calculation.
The first sentence, to me does not make sense, as calculateValue is called with arguments, it's just that dependencies don't factor in yet on first render.
Or my bad sorry:)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンク先のセクションにある useMemo のリファレンスページを開き、初回レンダーについての 2 つの説明を比較します。計算がどのように呼び出されるかを確認し、論理的に正確になるように一貫していない表現を修正します。説明が引数を省略することを示唆しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 55/100