![](/img/trans.png)
[英]How to communicate ReactDOM.render with other ReactDOM.render
[英]How can i ReactDOM.render() multiple react elements into a node without them killing each other?
當我使用ReactDOM.render()
幾次時,它會殺死節點中的其他元素。 如何將多個反應元素渲染到一個節點中而不會使它們互相殘殺?
你不能。
單個 DOM 節點可以托管到單個 React 根。 任何一個
<>
片段中)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.