popover: Uncaught Invariant Violation: Invalid hook call


Topic: popover: Uncaught Invariant Violation: Invalid hook call

sysadmin pro asked 6 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:

  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

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 6 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.


johndoe pro commented 6 years ago

Okay thank you. I'll wait for the incoming release.


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: 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