Timing of effects
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 11.8k
- フォーク
- 7.9k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 11
説明
Although
useEffectis deferred until after the browser has painted, it's guaranteed to fire before any new renders. React will always flush a previous render's effects before starting a new update.
Is this true in both concurrent and non-concurrent mode. It would appear intuitively that these two call-sites in non-concurrent mode would be deterministic:
ReactDOM.render(<Foo>, container)
ReactDOM.render(<Foo>, container)
That is it would invoke a new render before the effect in the first render has been invoked.
If so would it make more sense to specify it is only in relation to effects i.e previous effects are guaranteed to run before future effects.
As it stands, it looks appears as though the "render" call-site is non-deterministic in non-concurrent.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、エフェクトが新しいレンダーの前にフラッシュされるという、引用されたドキュメントの記述を確認し、その後、その文言を2か所のReactDOM.renderの呼び出し箇所、およびconcurrentとnon-concurrentの両方の動作と比較します。ドキュメントがサポートされる保証を明確に記載し、それがレンダー全般に適用されるのか、エフェクトの順序にのみ適用されるのかを明らかにできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100