-
Hi, I want to try use pan gesture with add useState in pan gesture callback (onEnd). But the app back into Expo main page. Is it bug or else ? |
Beta Was this translation helpful? Give feedback.
Answered by
m-bert
Mar 20, 2024
Replies: 1 comment
-
Hi! If I understood correctly, You want to call So to answer your question, no, it is not possible to call |
Beta Was this translation helpful? Give feedback.
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
Hi! If I understood correctly, You want to call
useState
insideonEnd
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.