Docs update request: Forwarding multiple refs
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 11.8k
- Fork
- 7.9k
- Merge medio
- 1g 11h
- PR unite (30g)
- 11
Descrizione
Hello!
I have found a variety of resources on the web describing ways to forward multiple refs to a child component so they can be accessed by a parent component:
- https://dev.to/oussel/a-guide-for-refs-in-react-45l6#chapter-5
- https://stackoverflow.com/a/53818443/4558300
- https://thewebdev.info/2021/11/14/how-to-forward-multiple-refs-with-react/
- https://medium.com/swlh/refs-and-forward-refs-in-react-be5bcb86fc69
Would it be possible to add a section to the official docs which describes what is going on in these examples? I think that these examples use the behavior of useRef as described in the useRef docs, but I'm honestly not sure. I think an official example of this would be very helpful.
Thanks!
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia confrontando gli esempi collegati con la documentazione React useRef citata nella issue. Determina come gli Docs ufficiali organizzano la guida sui refs, quindi aggiungi una sezione e un esempio che spieghino come inoltrare più refs; il lavoro è completato quando il comportamento e l’esempio sono documentati chiaramente negli Docs React appropriati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, react
- Ambito
- documentation
- Tipo di issue
- Documentazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100