Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect usage of Animated.Value causing gestures and state to be reset #202

Open
gaearon opened this issue Oct 5, 2023 · 0 comments
Open

Comments

@gaearon
Copy link

gaearon commented Oct 5, 2023

It is not correct to re-create Animated.Value on every render like this:

This is not valid because Animated values are stateful, and so they should be kept in state or a ref. Otherwise, any state update to the component will interrupt the current animation and/or gesture.

I'm filing this for future readers or whoever has a fork of this code in their codebase.

A potential fix would look like this: bluesky-social/social-app#1618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant