【react+amis】The above error occurred in the <TableRenderer> component

问题是:react中使用amis低代码开发时遇到的错误 

 Uncaught Error: Unable to find node on an unmounted component.
    at findHostInstanceWithWarning (react-dom.development.js:24281:1)
    at findDOMNode (react-dom.development.js:24804:1)
    at Table.componentDidMount (index.js:141:1)
    at commitLifeCycles (react-dom.development.js:20663:1)
    at commitLayoutEffects (react-dom.development.js:23426:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994:1)
    at invokeGuardedCallback (react-dom.development.js:4056:1)
    at commitRootImpl (react-dom.development.js:23151:1)
    at unstable_runWithPriority (scheduler.development.js:468:1)



The above error occurred in the <TableRenderer> component:

    at TableRenderer (http://localhost:8080/index.bundle.js:55878:42)
    at StoreFactory (http://localhost:8080/index.bundle.js:6320:36)
    at BroadcastCmpt (http://localhost:8080/index.bundle.js:5763:28)
    at SchemaRenderer (http://localhost:8080/index.bundle.js:5814:28)
    at div
    at CRUDRenderer (http://localhost:8080/index.bundle.js:29825:28)
    at StoreFactory (http://localhost:8080/index.bundle.js:6320:36)
    at ScopedComponent (http://localhost:8080/index.bundle.js:6209:32)
    at BroadcastCmpt (http://localhost:8080/index.bundle.js:5763:28)
    at SchemaRenderer (http://localhost:8080/index.bundle.js:5814:28)
    at div
    at div
    at div
    at div
    at PageRenderer (http://localhost:8080/index.bundle.js:50793:28)
    at StoreFactory (http://localhost:8080/index.bundle.js:6320:36)
    at ScopedComponent (http://localhost:8080/index.bundle.js:6209:32)
    at BroadcastCmpt (http://localhost:8080/index.bundle.js:5763:28)
    at SchemaRenderer (http://localhost:8080/index.bundle.js:5814:28)
    at RootRenderer (http://localhost:8080/index.bundle.js:5473:28)
    at ImageGallery (http://localhost:8080/index.bundle.js:13347:47)
    at class_1 (http://localhost:8080/index.bundle.js:26926:50)
    at class_1 (http://localhost:8080/index.bundle.js:62543:50)
    at Root (http://localhost:8080/index.bundle.js:5380:42)
    at ScopedComponent (http://localhost:8080/index.bundle.js:6209:32)
    at AMISComponent (http://localhost:8080/index.bundle.js:111143:5)
    at AmisApp (http://localhost:8080/index.bundle.js:111237:5)
    at div
    at main
    at div
    at div
    at MainPage (http://localhost:8080/index.bundle.js:112363:5)
    at Layout (http://localhost:8080/index.bundle.js:111814:5)

React will try to recreate this component tree from scratch using the error boundary you provided, RootRenderer.

经反复查找原因,发现是 react版本过高,amis对react16以上版本不支持

解决:切换react版本,就可以了

npm install react@16.x react-dom@16.x --save

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值