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

Fix useAnimatedGestureHandler for web #1518

Merged
merged 6 commits into from
Dec 10, 2020
Merged

Conversation

karol-bisztyga
Copy link
Contributor

@karol-bisztyga karol-bisztyga commented Dec 9, 2020

Description

For some time we were unable to use react-native-web above version 0.12.3. Along with gesture handler 1.9.0, this has been fixed as stated here.

It's required to pass a function on the web.

Fixes #1406

Changes

In Hooks.js instead of using useEvent on the web we just return the handling function(also extract the nativeEvent in that case).
For example project, the package versions have been updated.

Test code and steps to reproduce

Just run the example screens(like DragAndDrop or ChatHeads)

Checklist

  • Ensured that CI passes

src/reanimated2/Hooks.js Show resolved Hide resolved
src/reanimated2/Hooks.js Show resolved Hide resolved
Copy link
Member

@piaskowyk piaskowyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff 💪

@karol-bisztyga karol-bisztyga merged commit db08e0f into master Dec 10, 2020
@karol-bisztyga karol-bisztyga deleted the @karol/fix-web-gh branch December 10, 2020 14:16
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.

web: useAnimatedGestureHandler not working
4 participants