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

Don’t pass gesture handler wrapper props to child #3343

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oblador
Copy link
Contributor

@oblador oblador commented Jan 17, 2025

Description

When using useEvent from Reanimated together with PureNativeButton, I noticed that I would receive duplicate events. Upon further investigation I found that this was because createHandler renames the handlers and when reanimated attaches the worklet it does so twice because the same handler is available under different props.

This PR fixes this problem by simply not passing wrapper specific props to the child.

Test plan

Copy link
Contributor

@latekvo latekvo left a comment

Choose a reason for hiding this comment

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

LGTM, but please wait for one more review

@latekvo latekvo requested a review from m-bert January 17, 2025 17:07
@vovacodes
Copy link

Also ran into this issue, so would appreciate merging this in 🙏

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.

4 participants