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
found this workaround for react-hot-loader while that PR to fix it is inbound.
react-hot-loader
Wrap the function that calls hooks in a React.memo, preventing a hot reload if it's unchanged.
React.memo
const MyFunc = React.memo(({props}) => {...
Credit for solution: https://github.com/gatsbyjs/gatsby/issues/9489