How do I use callbacks on keyframe animations? #4039
Unanswered
AdamGerthel
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm struggling with using callbacks on keyframe animations. For some reason, the callback code either doesn't trigger (version
2.9.1
) or causes a crash about trying to run JS code on the UI thread (version3.0.0-rc.10
).I've tried using both
runOnJS
and'worklet'
without success.Here's a snack that uses
2.9.1
. I would expect the callback on line 28 to be called when the animation has finished but neither solutions (worklet or runOnJS) seem to work.https://snack.expo.dev/@insats/reanimated-keyframe-withcallback-not-working
What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions