Do I need a special import to use custom hooks in React ? #316
-
Beta Was this translation helpful? Give feedback.
Answered by
olavoparno
Feb 25, 2021
Replies: 1 comment 1 reply
-
This is a hook rule being broken, you see, in order to use hooks or custom hooks you must follow the rules of:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
coopterrones
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a hook rule being broken, you see, in order to use hooks or custom hooks you must follow the rules of:
function MyReactComponent()
or calling from a custom hook preappended with the worduse
, so you would have to have yourqueryCompetitions
renamed touseQueryCompetitions
.https://reactjs.org/docs/hooks-rules.html