antd table请教个问题

引用antd table控件的时候,在react版本15的时候,还没有问题,更新到react 16后,table不能显示,报错了。

使用方式:

package.json中 "react": "^16.2.0", "react-dom": "^16.2.0", "react-redux": "^5.0.7", <br/> 报错如下: react-dom.production.min.js:164 Error: Minified React error #44; visit http://facebook.github.io/rea... for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at r (reactProdInvariant.js:29) at Object.r [as findDOMNode] (findDOMNode.js:51) at t.saveRowRef (TableRow.js:151) at t.componentDidMount (TableRow.js:87) at commitLifeCycles (react-dom.production.min.js:149) at t (react-dom.production.min.js:158) at w (react-dom.production.min.js:169) at _ (react-dom.production.min.js:168) at h (react-dom.production.min.js:167) at d (react-dom.production.min.js:165) u @ react-dom.production.min.js:164 t @ react-dom.production.min.js:159 w @ react-dom.production.min.js:169 _ @ react-dom.production.min.js:168 h @ react-dom.production.min.js:167 d @ react-dom.production.min.js:165 enqueueSetState @ react-dom.production.min.js:108 o.setState @ react.production.min.js:12 (anonymous) @ codefile.jsx:34 reactProdInvariant.js:29 Uncaught (in promise) Error: Minified React error #44; visit http://facebook.github.io/rea... for the full message or use the non-minified dev environment for full errors and additional helpful warnings. at r (reactProdInvariant.js:29) at Object.r [as findDOMNode] (findDOMNode.js:51) at t.saveRowRef (TableRow.js:151) at t.componentDidMount (TableRow.js:87) at commitLifeCycles (react-dom.production.min.js:149) at t (react-dom.production.min.js:158) at w (react-dom.production.min.js:169) at _ (react-dom.production.min.js:168) at h (react-dom.production.min.js:167) at d (react-dom.production.min.js:165)
阅读 2.5k
2 个回答

把ANTD升级到3.0以上

antd版本太低了。
建议不要直接升级到最新版本,升级成本太高。
查一下antd的升级历史,升级到antd upgrade for react 16的相关版本就可以了。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
宣传栏