-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
feat: Remove platform check in requireNativeComponent to support additional platforms #18381
feat: Remove platform check in requireNativeComponent to support additional platforms #18381
Conversation
Quick question @rozele – I wasn't sure if the |
@jhampton the |
I'm good with this PR if you add the same change to |
Great, thank you! Quick question @rozele : is there a reason this couldn't/shouldn't be refactored into a separate module and |
@jhampton - I'm supportive of a separate module. |
I ended up making the same change to Also, it looks like CI is failing on |
The You may want to try pushing a dummy commit to trick Circle into running again, just in case. |
Thank you @hramos! I tried again, and it looks like |
Dummy commit to restart CI.
…-requireNativeComponent' into feature/remove-platform-specific-requireNativeComponent
Interesting...it looks like there are quite a few eslint failures in the new tests. I should be up to date as of this morning's |
I think I've seen CI to fail for other lint related reasons as well earlier today. I'll look into that too as I am planning on cutting few more releases today. Meanwhile, let's try merging that. |
@facebook-github-bot shipit |
Something went wrong executing that command, @hramos could you take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grabbou is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Interesting... 🤔 |
…tional platforms Summary: Using platform checks can make it difficult to incorporate changes for other platforms (e.g. Windows). Using a check for the underlying function accomplishes the same goal without relying on an Android-specific check. This change allows this JS file to be re-used instead of copied and modified. [X] Run Jest tests [X] Test in RNTester on simulators [X] Test in Playground No related PR's found :) [GENERAL] [ENHANCEMENT] [Libraries/ReactNative/requireFabricComponent.js] - Simplified check against UIManager to support additional platforms, removing Android-specific check Closes facebook#18381 Differential Revision: D7336214 Pulled By: hramos fbshipit-source-id: e936f1fdcf36556c528115ee3f79197883d7b7d4
…tional platforms Summary: Using platform checks can make it difficult to incorporate changes for other platforms (e.g. Windows). Using a check for the underlying function accomplishes the same goal without relying on an Android-specific check. This change allows this JS file to be re-used instead of copied and modified. [X] Run Jest tests [X] Test in RNTester on simulators [X] Test in Playground No related PR's found :) [GENERAL] [ENHANCEMENT] [Libraries/ReactNative/requireFabricComponent.js] - Simplified check against UIManager to support additional platforms, removing Android-specific check Closes facebook#18381 Differential Revision: D7336214 Pulled By: hramos fbshipit-source-id: e936f1fdcf36556c528115ee3f79197883d7b7d4
…tional platforms Summary: Using platform checks can make it difficult to incorporate changes for other platforms (e.g. Windows). Using a check for the underlying function accomplishes the same goal without relying on an Android-specific check. This change allows this JS file to be re-used instead of copied and modified. [X] Run Jest tests [X] Test in RNTester on simulators [X] Test in Playground No related PR's found :) [GENERAL] [ENHANCEMENT] [Libraries/ReactNative/requireFabricComponent.js] - Simplified check against UIManager to support additional platforms, removing Android-specific check Closes facebook#18381 Differential Revision: D7336214 Pulled By: hramos fbshipit-source-id: e936f1fdcf36556c528115ee3f79197883d7b7d4
…tional platforms Summary: Using platform checks can make it difficult to incorporate changes for other platforms (e.g. Windows). Using a check for the underlying function accomplishes the same goal without relying on an Android-specific check. This change allows this JS file to be re-used instead of copied and modified. [X] Run Jest tests [X] Test in RNTester on simulators [X] Test in Playground No related PR's found :) [GENERAL] [ENHANCEMENT] [Libraries/ReactNative/requireFabricComponent.js] - Simplified check against UIManager to support additional platforms, removing Android-specific check Closes facebook#18381 Differential Revision: D7336214 Pulled By: hramos fbshipit-source-id: e936f1fdcf36556c528115ee3f79197883d7b7d4
…tional platforms Summary: Using platform checks can make it difficult to incorporate changes for other platforms (e.g. Windows). Using a check for the underlying function accomplishes the same goal without relying on an Android-specific check. This change allows this JS file to be re-used instead of copied and modified. [X] Run Jest tests [X] Test in RNTester on simulators [X] Test in Playground No related PR's found :) [GENERAL] [ENHANCEMENT] [Libraries/ReactNative/requireFabricComponent.js] - Simplified check against UIManager to support additional platforms, removing Android-specific check Closes facebook#18381 Differential Revision: D7336214 Pulled By: hramos fbshipit-source-id: e936f1fdcf36556c528115ee3f79197883d7b7d4
…tional platforms Summary: Using platform checks can make it difficult to incorporate changes for other platforms (e.g. Windows). Using a check for the underlying function accomplishes the same goal without relying on an Android-specific check. This change allows this JS file to be re-used instead of copied and modified. [X] Run Jest tests [X] Test in RNTester on simulators [X] Test in Playground No related PR's found :) [GENERAL] [ENHANCEMENT] [Libraries/ReactNative/requireFabricComponent.js] - Simplified check against UIManager to support additional platforms, removing Android-specific check Closes facebook#18381 Differential Revision: D7336214 Pulled By: hramos fbshipit-source-id: e936f1fdcf36556c528115ee3f79197883d7b7d4
…tional platforms Summary: Using platform checks can make it difficult to incorporate changes for other platforms (e.g. Windows). Using a check for the underlying function accomplishes the same goal without relying on an Android-specific check. This change allows this JS file to be re-used instead of copied and modified. [X] Run Jest tests [X] Test in RNTester on simulators [X] Test in Playground No related PR's found :) [GENERAL] [ENHANCEMENT] [Libraries/ReactNative/requireFabricComponent.js] - Simplified check against UIManager to support additional platforms, removing Android-specific check Closes facebook/react-native#18381 Differential Revision: D7336214 Pulled By: hramos fbshipit-source-id: e936f1fdcf36556c528115ee3f79197883d7b7d4
Motivation
Using platform checks can make it difficult to incorporate changes for other platforms (e.g. Windows).
Using a check for the underlying function accomplishes the same goal without relying on an Android-specific check. This change allows this JS file to be re-used instead of copied and modified.
Test Plan
[X] Run Jest tests
[X] Test in RNTester on simulators
[X] Test in Playground
Related PRs
No related PR's found :)
Release Notes
[GENERAL] [ENHANCEMENT] [Libraries/ReactNative/requireFabricComponent.js] - Simplified check against UIManager to support additional platforms, removing Android-specific check