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 RNGestureHandlerManager to use explicit imports #1160

Conversation

PeteTheHeat
Copy link
Contributor

Description

I work on RN Core at Facebook, and am encountering a unique problem. I'm trying to refactor RCTEventDispatcher, but cannot because of the implicit dependency on RCTEventDispatcher in RNGestureHandlerManager. We use rn-gesture-handler internally, and builds for it fail after the refactor.

The fix is to explicitly depend on RCTEventDispatcher instead of relying on the RCTUIManager -> RCTViewManager -> RCTEventDispatcher import chain.

Test plan

I unfortunately did not test this. I can't get react-native-gesture-handler building locally. I assume that there are CI builds that would fail on a simple compilation error.

Copy link
Member

@jakub-gonet jakub-gonet left a comment

Choose a reason for hiding this comment

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

It's interesting that the RN uses RNGH internally, is it open-sourced?

@PeteTheHeat
Copy link
Contributor Author

Sorry, I should have been more clear.

Facebook uses RNGH internally in a few apps. In order to land my refactor to RN core, those apps must build.

@jkadamczyk jkadamczyk self-requested a review September 1, 2020 11:49
@jkadamczyk
Copy link
Contributor

I think we can merge that. Builds are passing on CI.
CC @jakub-gonet

@jkadamczyk jkadamczyk merged commit e64d6fc into software-mansion:master Sep 1, 2020
@jkadamczyk
Copy link
Contributor

Thanks for your contribution @PeteTheHeat

braincore pushed a commit to braincore/react-native-gesture-handler that referenced this pull request Mar 4, 2021
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.

3 participants