Resetting translateY Timing Issue When Using PanGesture for Sortable List #7377
Unanswered
wwxxjj2233
asked this question in
Q&A
Replies: 1 comment
-
I answered your questions under the issue that you opened. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
When I use the PanGesture handler to build a sortable list, I utilize useSharedValue to control the translateY value of the dragged item for the drag animation. After completing the drag-and-drop sorting and updating the order of the data array, at what point should I reset the translateY value to ensure there is no flickering?
Specifically, when I drag an item such that its translateY becomes 100 and then reorder the data array, I should reset the item's translateY to 0. However, during the view rendering, this reset triggers an animation again, causing flickering.
Beta Was this translation helpful? Give feedback.
All reactions