Open
Conversation
tomekzaw
reviewed
Feb 14, 2026
| <CollapsibleCode showLines={[17, 33]} src={PanGestureSrc} /> | ||
|
|
||
| The callback passed to `onChange` comes with some [event data](https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/pan-gesture#event-data) that has a bunch of handy properties. One of them is `translationX` which indicates how much the object has moved on the X axis. We stored that in a shared value to move the circle accordingly. To make the circle come back to its initial place all you have to do is to reset the `offset.value` in the `onFinalize` method. We can use `withSpring` or `withTiming` functions to make it come back with an animation. | ||
| The callback passed to `onChange` comes with some [event data](https://docs.swmansion.com/react-native-gesture-handler/docs/legacy-gestures/pan-gesture#event-data) that has a bunch of handy properties. One of them is `translationX` which indicates how much the object has moved on the X axis. We stored that in a shared value to move the circle accordingly. To make the circle come back to its initial place all you have to do is to reset the `offset.value` in the `onFinalize` method. We can use `withSpring` or `withTiming` functions to make it come back with an animation. |
Contributor
Author
There was a problem hiding this comment.
For now it won't work, as PR that adds legacy section has not yet been merged on Gesture Handler side 😅
Happy Valentines day 💞
Contributor
Author
There was a problem hiding this comment.
For now it won't work, as PR that adds legacy section has not yet been merged on Gesture Handler side 😅
Happy Valentines day 💞
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After releasing beta version of Gesture Handler 3, some of the links in documentation have changed and referencing old ones results in 404. This has been partially solved on our side with redirects and legacy section. However, we still need to update some links in Reanimated, as our docs here use anchors, which are not supported by redirects.
Test plan
Check links in docs.