[Suggestion]: Confusing example in UseTransition
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 11.8k
- フォーク
- 7.9k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 11
説明
Summary
In UseTransition example, you have used input as DOM control so it's instantly updating quantity, which is confusing as it suppose to wait for server call then we can understand the use of transition there, I don't find this document is useful, all examples are very confusing.
below code would be helpful. Didn't expect this from react doc itself, I feel I have better understanding than who written this doc's.
export default function Item({quantity, onUpdateQuantity}) { function handleChange(event) { onUpdateQuantity(event.target.value); } return ( <div className="item"> <span>Eras Tour Tickets</span> <label htmlFor="name">Quantity: </label> <input type="number" value={quantity} onChange={handleChange} /> </div> ) }
Page
No response
Details
Please update Use Transition example that is related to quantity and total.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされている useTransition ドキュメントの例「Perform non-blocking updates with Actions」を開き、数量入力と合計がどのように表示されているかを確認してください。提案されている Item の例と現在のフローを比較し、サーバー呼び出しにおける transition の目的が明確になるように、数量と合計の例を更新してください。更新後の例が理解しやすく、意図された transition の動作を正確に示していれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100