Missing documentation
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.8k
- Forks
- 7.9k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ReactDOM.render examples described in the issue and compare them with the existing React documentation. Determine whether rendering into a DOM element produced by another component is supported or should be avoided, then document the guidance and verify that the page addresses the nested-rendering case raised here.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- documentation, frontend
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100