react-json-view-compare icon indicating copy to clipboard operation
react-json-view-compare copied to clipboard

Invalid hook call. Hooks can only be called inside of the body of a function component

Open ghost opened this issue 4 years ago • 2 comments

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

I'm getting above message while integrating the code. Could you please let me know if i'm missing anything. I'm using React class components.

ghost avatar Feb 16 '21 16:02 ghost

maybe the react version's problerm,you can Check if your react version is the same as this repo

5SSS avatar Mar 26 '21 07:03 5SSS

We are also facing same issue while using this component. We even tried by changing our react version to match the component but it is not working. Attached is the list of versions in my application. dependency

atulonweb avatar May 03 '21 14:05 atulonweb