Missing documentation
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
I stumbled onto something that works but is not documented and I'd like to understand if it should be avoided.
The setup: Non react application renders various react components in few places.
I've noticed couple of components that do the following:
function Foo(props){
return <div>
Some content
<div id="placeholder"></div>
</div>
}
ReactDOM.render(<Foo/>, domRef)
Somewhere else in the application ReactDOM.render(<Bar/>, document.getElementById("placeholder")). The "placeholder" being the dom element rendered by the <Foo /> component.
I couldn't find anything in the React docs and Stackoverflow describing how/if this should work. Any light on the subject would be much appreciated.
I have also opened a this: https://stackoverflow.com/questions/66134211/reactdom-render-one-react-component-inside-the-render-tree-of-another
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 den im Issue beschriebenen ReactDOM.render-Beispielen und vergleiche sie mit der vorhandenen React-Dokumentation. Ermittle, ob das Rendern in ein von einer anderen Komponente erzeugtes DOM-Element unterstützt wird oder vermieden werden sollte, dokumentiere anschließend die entsprechenden Hinweise und überprüfe, dass die Seite den hier aufgeworfenen Fall des verschachtelten Renderns behandelt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, react
- Bereich
- documentation, frontend
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 32/100