为了账号安全,请及时绑定邮箱和手机立即绑定

React.js redux 渲染错误?

React.js redux 渲染错误?

萧十郎 2018-08-07 12:00:19
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 方法,查看你自己的代码确认下


查看完整回答
反对 回复 2018-08-30
  • 2 回答
  • 0 关注
  • 974 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号