Passing Functions to Components FAQ: document a pattern for class components
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ả
The Passing Functions to Components FAQ page discusses some strategies for passing parameters to the callbacks, out of which using data attributes on DOM elements for better performance is an addition to the ones described on the Handling Events docs.
I wrote about a similar pattern for class components, and was wondering if it would be a good addition to the FAQ page. (Of course, I'd love to know whether the things I say there are accurate, misinterpret the performance implications in any way, or generally sound like bad ideas.)
Tangentially, it may be a good idea to link to the FAQ from the Handling Events page? I was initially not aware there's extra information on the subject.
I must add that the React website is one of the best documentations I've ever read through, and in particular the FAQ section seems to include actual frequent questions :)
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 với Passing Functions to Components FAQ và trang Handling Events, sau đó so sánh mẫu đề xuất cho class component trong property-pattern.md được liên kết của react-recipes. Kiểm tra xem mẫu này và các tuyên bố về hiệu năng của nó có chính xác không, đồng thời quyết định xem FAQ có nên ghi lại mẫu này và liên kết đến hướng dẫn Handling Events hay không. Công việc được xem là hoàn tất khi các thay đổi tài liệu và mọi liên kết chéo đã được thống nhất và cập nhật.
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100