When I use ReactDOM.render()
a few times, it kills the other elements in the node. How can I render multiple react elements into a node without them killing each other?
You can't.
A single DOM node can be host to a single React root. Either
<>
fragment).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.