Document Controlled vs Uncontrolled Component Design pattern
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
pursuant to this discussion https://twitter.com/dan_abramov/status/1001943857096003584
all react components can be:
- controlled (no internal state)
- uncontrolled (internal state)
- mixed (uncontrolled by default, unless some props are passed to make it controlled)
the current docs on controlled vs uncontrolled: https://reactjs.org/docs/uncontrolled-components.html focus entirely on forms, but this design pattern applies to -all- components. we should document this.
questions
- What else should we say in the docs?
- do we want to tell people that they can do "mixed control" or do we leave that for people to discover for themselves?
- is this the same page as https://reactjs.org/docs/uncontrolled-components.html or is it a separate page?
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 der bestehenden Dokumentation zu uncontrolled-components.html und der verlinkten Diskussion. Kläre, ob controlled, uncontrolled und mixed component patterns auf diese Seite oder auf eine separate Seite gehören, und bestimme, welche Hinweise die Dokumentation geben sollte. Erledigt ist die Aufgabe, wenn die ausgewählte Dokumentation das Pattern über Formulare hinaus klar abdeckt und die offenen Fragen zum Umfang beantwortet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100