BenoHiT
BenoHiT

Reputation: 312

stuck on the error. Invalid hook call. Everything looks good

So I am trying to make a function that get the login infos to my API. Have tried everything. But its keep stopping the line of the useSate (where there is the red arrow). So it looks the useState doesn't want to work for no reason because the log just before works as you can see on the error screenshot. Notice that the previous exported function works perfectly. And I dont have mismatching versions of react.

Any ideas ?

enter image description here

enter image description here

enter image description here

Upvotes: 0

Views: 46

Answers (1)

Yasser hennawi
Yasser hennawi

Reputation: 815

Just like you have useFindAllBarAround as your Custom hook starting with the word use, could you also do the same with queryLogin?

Upvotes: 1

Related Questions