[Native] Delete NativeComponent and NativeMethodsMixin#18036
Merged
elicwhite merged 2 commits intofacebook:masterfrom Feb 13, 2020
Merged
[Native] Delete NativeComponent and NativeMethodsMixin#18036elicwhite merged 2 commits intofacebook:masterfrom
elicwhite merged 2 commits intofacebook:masterfrom
Conversation
Details of bundled changes.Comparing: d4f2b03...69a7f78 react-native-renderer
Size changes (experimental) |
Details of bundled changes.Comparing: d4f2b03...69a7f78 react-native-renderer
Size changes (stable) |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 69a7f78:
|
elicwhite
added a commit
to elicwhite/react
that referenced
this pull request
Feb 26, 2020
* [Native] Delete NativeComponent and NativeMethodsMixin * Remove more files
yungsters
reviewed
Oct 14, 2021
| * Provide minimal Flow typing for the high-level RN API and call it a day. | ||
| */ | ||
| export type ReactNativeType = { | ||
| NativeComponent: typeof ReactNativeComponent, |
Contributor
There was a problem hiding this comment.
I think this was a breaking change because now people cannot importNativeComponent.
The fix is to migrate to the exported HostComponent type.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
NativeComponent and NativeMethodsMixins were JS APIs for creating components that proxied the methods to the underlying host component by using
findNodeHandle. Nothing in core uses these anymore, core uses forwardRef instead. We can finally delete these!These APIs weren't exposed as part of the public API of React Native so this isn't a breaking change.
Test Plan
Jest, Flow. I also imported this diff into Facebook to run a build size bot and mobile lab. Diff here: https://our.internmc.facebook.com/intern/diff/D19458361/