Is it not clear if the effect's clean up logic from a component making using of context is ran BEFORE re-rendering any other instance of the same component (on the same hierarchy level)
オープン
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 11.8k
- フォーク
- 7.9k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 11
説明
Runnable example: https://codesandbox.io/s/fast-sunset-8c0z2?file=/src/App.js
What is clear: It is clear a change in context will cause all consumers to re-render.
What is not clear: When using useEffect's clean up function - ( return () => { do some clean up } ) will that always be done for ALL component instance using the same context BEFORE re-rendering the other components of the same type ( ie multiple instances of MyComp )?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue にリンクされている実行可能な CodeSandbox の例から始め、src/App.js を調べて、コンテキストの更新と useEffect のクリーンアップの挙動を再現します。複数の MyComp インスタンス間での順序を特定し、その答えと関連する注意点を React ドキュメントの適切な場所に記載します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100