react-0.14.0.js:18745 Warning: render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render.頁面是能正常渲染出來,但是為什么會出現這個錯誤?
2 回答

大話西游666
TA貢獻1817條經驗 獲得超14個贊
這個警告是在說你在重新渲染react組件中的子組件或者節點的時候原來的根節點被替換掉了,類似于你將
ReactDom.render(<App />, document.getElementById('a')
App
中的 children
發生了變化,這個時候你可能又調用了 ReactDOM.render
方法,查看你自己的代碼確認下
添加回答
舉報
0/150
提交
取消