No API docs on React Refresh
まだ誰も着手していません。
- 主要言語
- JavaScript
- スター
- 11.8k
- フォーク
- 7.9k
- 平均マージ
- 1日 11時間
- マージ済み PR(30日)
- 11
説明
I was experiencing how useEffect was re-running with empty dependencies due to HMR (which was expected) on changes, but I saw how re-running did not trigger the useEffect cleanup function. This was unexpected and maybe a bug? I thought I would reference the HMR / Fast Refresh docs to verify the expected behaviour before reporting, but I could not find anything (apart from reactnative.dev) on any React owned sites! All docs/articles I could find were on third party sites.
AFAIK, Fast Refresh is the native (as in built-in) React solution to HMR, so it is part of React. That means it has an API exposed to end users, and I would then expect it to be documented. Searching "HMR" or "Fast Refresh" comes up with nothing when using the docs search feature.
I can only find "implicit docs" on Fast Refresh on the issue tracker (such as these by Dan: https://github.com/facebook/react/issues/21019) or on external articles and none mention how the cleanup callback is supposed to work in Fast Refresh mode.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、reactnative.dev にある既存の Fast Refresh に関する資料、React ドキュメントで「HMR」と「Fast Refresh」を検索した結果、およびリンクされている issue #21019 を確認します。cleanup コールバックに期待される動作を判断し、React が管理するドキュメントページで Fast Refresh の公開動作と API の概念を文書化します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, react
- 領域
- documentation
- issue の種類
- ドキュメント
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100