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

Remove ref from useAnimatedReaction hook #1412

Merged
merged 1 commit into from
Nov 9, 2020

Conversation

karol-bisztyga
Copy link
Contributor

@karol-bisztyga karol-bisztyga commented Nov 5, 2020

Description

This PR is a response for the problem with useAnimatedReaction hook. The problem is with using reference inside of that hook, because it persists the mapper's input values between rerenders. This may even work if we don't change the type of the input but the problem occurred when the input changed from undefined to number.

Reproducing code is in the issue.

Fixes #1399

@karol-bisztyga karol-bisztyga marked this pull request as ready for review November 5, 2020 16:35
@karol-bisztyga karol-bisztyga merged commit f6cbdb2 into master Nov 9, 2020
@karol-bisztyga karol-bisztyga deleted the @karol/fix-animated-reaction branch November 9, 2020 07:56
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

Successfully merging this pull request may close these issues.

useAnimatedReaction does not trigger correctly
2 participants