Passing Functions to Components FAQ: document a pattern for class components
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 11.8k
- Forks
- 7.9k
- Ø Merge
- 1 T. 11 Std.
- Gemergte PRs (30 T.)
- 11
Beschreibung
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 :)
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem Passing Functions to Components FAQ und der Handling Events-Seite und vergleiche anschließend das vorgeschlagene Klassenkomponenten-Muster in der verlinkten react-recipes property-pattern.md. Prüfe, ob das Muster und seine Performance-Aussagen korrekt sind, und entscheide, ob das FAQ es dokumentieren und auf die Handling Events-Anleitung verlinken sollte. Abgeschlossen ist die Aufgabe, wenn die Dokumentationsänderungen und alle Querverweise abgestimmt und aktualisiert sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100