Skip to content
Discussion options

You must be logged in to vote

You're violating the rules of hooks, hooks cannot be nested in functions like that. They must be top-level within a component and unconditional.

useLocation is a hook, as is anything starting with use.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@waymost
Comment options

Answer selected by waymost
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants