I am getting this error when using the useState hook. I have this in it\'s basic form, looking at the react docs for a reference, but am still getting this erro
useState
For me, this was occurring because I had a new version of react (16.8.6) and an old version of react-dom (16.6.1).
https://reactjs.org/warnings/invalid-hook-call-warning.html#mismatching-versions-of-react-and-react-dom
Upgrading both to @latest (16.8.6) fixed the error.