Topic: popover: Uncaught Invariant Violation: Invalid hook call
johndoe pro asked 5 years ago
Using: mdbreact-4.12.0, react/react-dom 16.8.6 with react-popper 1.3.3
Getting a:
Uncaught Invariant Violation: 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:
- You might have mismatching versions of React and the renderer (such as React DOM)
- You might be breaking the Rules of Hooks
- You might have more than one copy of React in the same app
Using the example code and created a new page from the react popper page: https://mdbootstrap.com/docs/react/advanced/popovers/
Aliaksandr Andrasiuk staff answered 5 years ago
Hello,
It's a issue which will be fixed in our upcoming release.
If you want to use it now, you can get the fixed version from branch next
in our Gitlab repository. And then delete your node_modules folder, then delete package-lock.json and use 'yarn' or 'npm install' command again.
Best regards,
Aliaksandr from MDB.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB React
- MDB Version: 4.11.1
- Device: Desktop/PC
- Browser: Chrome
- OS: Windows
- Provided sample code: No
- Provided link: Yes