React js Hooks问题与React版本不匹配

时间:2020-02-12 15:29:47

标签: reactjs react-router mdbootstrap mdbreact

我正在开发一个包含400多个组件的应用程序,并实现了Redux和路由器。

我的项目运行顺利。在使用mdbreact数据表时,我尝试将mdbreact更新为最新版本,然后,我得到了以下错误:

Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app

我没有使用钩子,我的团队成员代码工作正常;我已经用我的JSON和src文件替换了它,但这给了我同样的问题。

0 个答案:

没有答案