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

Remove injectComponentTree from unstable-native-dependencies, add EventPluginHub #13598

Merged

Conversation

@aweary
Copy link
Contributor

@aweary aweary commented Sep 8, 2018

Resolves #13589

injectComponentTree was exposed for react-native-web, but wasn't actually being used by the project. There don't appear to be any call sites for injectComponentTree in www either (FB Internal).

RNW is using EventPluginHub through ReactDOM's secret internals, but that was removed in #13539

This removes the unused injectComponentTree export, refactors the ResponderEventPlugin test so it doesn't depend on it, and also adds EventPluginHub to the exports to unbreak RNW with 16.5

cc @necolas

EventPluginHub

injectComponentTree was exposed for react-native-web, but wasn't
actually being used by the project. They were using EventPluginHub
through ReactDOM's secret internals, but that was removed in facebook#13539

This removes the unused injectComponentTree export, refactors the
ResponderEventPlugin test so it doesn't depend on it, and also adds
EventPluginHub to the exports to unbreak react-native-web
@pull-bot
Copy link

@pull-bot pull-bot commented Sep 8, 2018

Details of bundled changes.

Comparing: b87aabd...e9ade0f

schedule

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
schedule.development.js n/a n/a 0 B 19.17 KB 0 B 5.74 KB UMD_DEV
schedule.production.min.js n/a n/a 0 B 3.16 KB 0 B 1.53 KB UMD_PROD

Generated by 🚫 dangerJS

Loading

@gaearon
Copy link
Member

@gaearon gaearon commented Sep 8, 2018

I think this might be insufficient because it's likely RNW actually needs EventPluginHub from inside of ReactDOM rather than a copy of it that would get bundled with this entry point. Need testing to verify.

Loading

@aweary
Copy link
Contributor Author

@aweary aweary commented Sep 8, 2018

I think you're right. In that case we can just add it back to ReactDOM secret internals, and re-export it?

Loading

@gaearon
Copy link
Member

@gaearon gaearon commented Sep 8, 2018

Yeah but that can increase the bundle size. At least let's just export the smallest unit we can (that method alone).

Loading

gaearon
gaearon approved these changes Sep 8, 2018
Copy link
Member

@gaearon gaearon left a comment

Please test that this fixes RNW

Loading

@aweary aweary force-pushed the event-plugin-hub-unstable-native-deps branch from 2913463 to e9ade0f Sep 8, 2018
@aweary
Copy link
Contributor Author

@aweary aweary commented Sep 8, 2018

With these changes to React Native for Web I verified that the reproducing example from necolas/react-native-web#1096 no longer throws with a local build form this branch.

I also verified the same with the examples application in the RNW repo.

Loading

@gaearon
Copy link
Member

@gaearon gaearon commented Sep 8, 2018

Coolio

Loading

@aweary aweary merged commit 7d1169b into facebook:master Sep 8, 2018
1 check passed
Loading
@gaearon gaearon mentioned this pull request Sep 13, 2018
@gaearon
Copy link
Member

@gaearon gaearon commented Sep 13, 2018

Should be fixed in 16.5.1

Loading

@msand
Copy link

@msand msand commented Sep 14, 2018

@aweary Great work! Could you make a pr with the changes to rnw?

Loading

Simek added a commit to Simek/react that referenced this issue Oct 25, 2018
…ntPluginHub (facebook#13598)

* Remove injectComponentTree from unstable-native-dependencies, add
EventPluginHub

injectComponentTree was exposed for react-native-web, but wasn't
actually being used by the project. They were using EventPluginHub
through ReactDOM's secret internals, but that was removed in facebook#13539

This removes the unused injectComponentTree export, refactors the
ResponderEventPlugin test so it doesn't depend on it, and also adds
EventPluginHub to the exports to unbreak react-native-web

* Re-export injectEventPluginsByName from ReactDOM internals
jetoneza added a commit to jetoneza/react that referenced this issue Jan 23, 2019
…ntPluginHub (facebook#13598)

* Remove injectComponentTree from unstable-native-dependencies, add
EventPluginHub

injectComponentTree was exposed for react-native-web, but wasn't
actually being used by the project. They were using EventPluginHub
through ReactDOM's secret internals, but that was removed in facebook#13539

This removes the unused injectComponentTree export, refactors the
ResponderEventPlugin test so it doesn't depend on it, and also adds
EventPluginHub to the exports to unbreak react-native-web

* Re-export injectEventPluginsByName from ReactDOM internals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants