Replace RCTBubblingEventBlock by RCTDirectEventBlock to avoid event name collision with Expo AV #1625
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update the changelog
Pending, will do tomorrow.
Provide an example of how to test the change
Test case with expo is reported here: #1618
Describe the changes
Replaces RCTBubblingEventBlock for RCTDirectEventBlock.
As bubbling events are recommended for DOM-like events (scroll, focus, ...) that need to propagate.
This avoids collision on event names with the expo av library. As
DeviceEventEmitter
is shared among all libraries.Ref: https://gist.github.com/chourobin/f83f3b3a6fd2053fad29fff69524f91c#ios
Notes: Bubbling events are like DOM events so that a parent component can capture an event fired by its child. Generally these are UI-related, like "the user touched this box". Direct events are not bubbled and are intended for more abstract events like "this image failed to load".
Closes #1618
Tomorrow I will test that events are firing correctly, but I open the PR so people can test it easily.