首页 > React.js redux 渲染错误?

React.js redux 渲染错误?

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.

页面是能正常渲染出来,但是为什么会出现这个错误?


问题描述的不是很清楚。。。
https://github.com/aickin/react-dom-stream/issues/4 应该是类似的情况


这个警告是在说你在重新渲染react组件中的子组件或者节点的时候原来的根节点被替换掉了,类似于你将

ReactDom.render(<App />, document.getElementById('a')

App 中的 children 发生了变化,这个时候你可能又调用了 ReactDom.render 方法,查看你自己的代码确认下


可能你渲染前后的dom结构不同了?

【热门文章】
【热门文章】