Skip to content

useState in pan gesture callback (onEnd) #2764

Closed Answered by m-bert
Yudha17 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! If I understood correctly, You want to call useState inside onEnd callback. However, it seems to go against rules of hooks. On web you can see this error message:

So to answer your question, no, it is not possible to call useState inside callback and it is not a bug.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by m-bert
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