No API docs on React Refresh
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 11.8k
- Fork
- 7.9k
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 11
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách xem lại tài liệu Fast Refresh hiện có trên reactnative.dev, các kết quả tìm kiếm trong tài liệu React cho “HMR” và “Fast Refresh”, cùng issue được liên kết #21019. Xác định hành vi cleanup-callback được mong đợi và ghi lại hành vi công khai cũng như các khái niệm API của Fast Refresh trên một trang tài liệu do React quản lý.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript, react
- Lĩnh vực
- documentation
- Loại issue
- Tài liệu
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100