React
React invalid hook call
React detected a Hook being called in an unsupported location, such as outside a function component or custom Hook, and stopped rendering with the invalid hook call error.
React
React detected a Hook being called in an unsupported location, such as outside a function component or custom Hook, and stopped rendering with the invalid hook call error.
Observed message
Invalid hook call. Hooks can only be called inside of the body of a function component.
Why it happens
How to fix it
Official reference
React Docs: Minified React error #404Related errors
Explore more