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: do not bubble event to root element #30

Merged
merged 1 commit into from
Oct 15, 2018
Merged

Conversation

Esemesek
Copy link
Collaborator

Remove bubbling events to the root element as in the most common use case we pass handler prop to the root element:

// That's usually what we do in tests
const tree = render(<SomeElement onPress={mockedHandler} />);

// Unsupported use case
const tree = render(<TouchableOpacity onPress={mockHandler()}><Text>XD</Text></TouchableOpacity>)

@thymikee thymikee changed the title Fix Do not bubble event to root element fix: do not bubble event to root element Oct 15, 2018
@thymikee thymikee merged commit a39f879 into master Oct 15, 2018
@thymikee thymikee deleted the fix/root-bubble branch October 15, 2018 15:03
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.

2 participants