Replies: 1 comment 1 reply
-
@priedejm Instead of using a state for current position, you can do the following: const animatedPosition = useSharedValue(0) useSharedValue is imported from reanimated library. and pass this constant to For example: Let's say we have 2 snapPoints [300, 850] index === -1 |
Beta Was this translation helpful? Give feedback.
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 am trying to figure out how I can track the location of my bottom sheets location on the y-axis. I noticed the props animatedPosition and onChange and figured a combination of the two could do the trick. The issue is I cannot find any examples anywhere of animatedPosition being used.
Could someone point me in the right direction on how I can accomplish this?
Upon finding no examples, I tried what you see below. No luck on printing anything other than 0 though.
Thank you for any insight at all, I appreciate it more than you know.
Beta Was this translation helpful? Give feedback.
All reactions