Skip to content

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>)

@Esemesek Esemesek requested a review from thymikee October 15, 2018 14:56
@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