-
Notifications
You must be signed in to change notification settings - Fork 24.5k
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
'[skip ci] [RN][JS] UIManagerJSInterface: Fix getConstantsForViewManager types #42442
Conversation
This pull request was exported from Phabricator. Differential Revision: D52628937 |
fbcaf9f
to
a94b2dd
Compare
This pull request was exported from Phabricator. Differential Revision: D52628937 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D52628937 |
a94b2dd
to
d943ba0
Compare
…42442) Summary: If Flow can be trusted, getConstantsForViewManager always gets called with a non-null string: 1. The only call-site to getConstantsForViewManager is getViewManagerConfig: [PaperUIManager.js](https://github.com/facebook/react-native/blob/822bf52c29729d25b2bfb31655cf773609a9283d/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L36-L80) 2. And getViewManagerConfig always passes in a non-null string. So, let's just make the native argument type a non-nullable string. Thoughts? Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D52628937
d943ba0
to
84e5cfd
Compare
…acebook#42442) Summary: If Flow can be trusted, getConstantsForViewManager always gets called with a non-null string: 1. The only call-site to getConstantsForViewManager is getViewManagerConfig: [PaperUIManager.js](https://github.com/facebook/react-native/blob/822bf52c29729d25b2bfb31655cf773609a9283d/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L36-L80) 2. And getViewManagerConfig always passes in a non-null string. So, let's just make the native argument type a non-nullable string. Thoughts? Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D52628937
This pull request was exported from Phabricator. Differential Revision: D52628937 |
…acebook#42442) Summary: If Flow can be trusted, getConstantsForViewManager always gets called with a non-null string: 1. The only call-site to getConstantsForViewManager is getViewManagerConfig: [PaperUIManager.js](https://github.com/facebook/react-native/blob/822bf52c29729d25b2bfb31655cf773609a9283d/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L36-L80) 2. And getViewManagerConfig always passes in a non-null string. So, let's just make the native argument type a non-nullable string. Thoughts? Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D52628937
This pull request was exported from Phabricator. Differential Revision: D52628937 |
84e5cfd
to
1fd682d
Compare
…ger types (facebook#42442) Summary: Pull Request resolved: facebook#42442 If Flow can be trusted, getConstantsForViewManager always gets called with a non-null string: 1. The only call-site to getConstantsForViewManager is getViewManagerConfig: [PaperUIManager.js](https://github.com/facebook/react-native/blob/822bf52c29729d25b2bfb31655cf773609a9283d/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L36-L80) 2. And getViewManagerConfig always passes in a non-null string. So, let'\''s just make the native argument type a non-nullable string. Thoughts? Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D52628937 fbshipit-source-id: 2e16d79f28be4066b8e7f9ef62deb6c5802fe358
…acebook#42442) Summary: If Flow can be trusted, getConstantsForViewManager always gets called with a non-null string: 1. The only call-site to getConstantsForViewManager is getViewManagerConfig: [PaperUIManager.js](https://github.com/facebook/react-native/blob/822bf52c29729d25b2bfb31655cf773609a9283d/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L36-L80) 2. And getViewManagerConfig always passes in a non-null string. So, let's just make the native argument type a non-nullable string. Thoughts? Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D52628937
…42442) Summary: If Flow can be trusted, getConstantsForViewManager always gets called with a non-null string: 1. The only call-site to getConstantsForViewManager is getViewManagerConfig: [PaperUIManager.js](https://github.com/facebook/react-native/blob/822bf52c29729d25b2bfb31655cf773609a9283d/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L36-L80) 2. And getViewManagerConfig always passes in a non-null string. So, let's just make the native argument type a non-nullable string. Thoughts? Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D52628937
1fd682d
to
8858dcd
Compare
This pull request was exported from Phabricator. Differential Revision: D52628937 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D52628937 |
8858dcd
to
470d384
Compare
Base commit: d16531e |
470d384
to
50c350c
Compare
This pull request was exported from Phabricator. Differential Revision: D52628937 |
Summary: This API was used by the old architecture to lazily register/load components: 1. Load a ViewManager's class from the disk 2. Register the ViewManager's class with React Native See: [RCTUIManager lazilyLoadView](https://github.com/facebook/react-native/blob/822bf52c29729d25b2bfb31655cf773609a9283d/packages/react-native/React/Modules/RCTUIManager.m#L1546-L1591) The new architecture **does not** support lazy loading of **legacy** modules/components. Therefore, let's leave this API unimplemented until we decide to implement lazy loading of legacy stuff in new architecture. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D52677515
…#42208) Summary: I went through the [android](https://github.com/facebook/react-native/blob/main/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java?fbclid=IwAR29Xk1KiGsxg7O2Fc7F2k4uKFmqqAbcMtsEEdaBalcGjJK7xuyYDo6X1Z8) and [ios](https://github.com/facebook/react-native/blob/main/packages/react-native/React/Modules/RCTUIManager.m?fbclid=IwAR2axOTNVuvGbnGw0_1wlnRhftx4W6K-ptTm_DtQ-eSOLFtnrYwzbjPyeYA) implementations of UIManagerModule. It turns out, the reactTag is always nonnull in all methods! This diff updates UIManagerJSInterface accordingly. Changelog: [General][Changed] - UIManagerModule: Make reactTags required Reviewed By: sammy-SC Differential Revision: D52627087
Summary: If Flow can be trusted, getConstantsForViewManager always gets called with a non-null string: 1. The only call-site to getConstantsForViewManager is getViewManagerConfig: [PaperUIManager.js](https://github.com/facebook/react-native/blob/822bf52c29729d25b2bfb31655cf773609a9283d/packages/react-native/Libraries/ReactNative/PaperUIManager.js#L36-L80) 2. And getViewManagerConfig always passes in a non-null string. So, let's just make the native argument type a non-nullable string. Thoughts? Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D52628937
50c350c
to
3edc97e
Compare
This pull request was exported from Phabricator. Differential Revision: D52628937 |
Summary:
If Flow can be trusted, getConstantsForViewManager always gets called with a non-null string:
So, let'''s just make the native argument type a non-nullable string.
Thoughts?
Changelog: [Internal]
Reviewed By: sammy-SC
Differential Revision: D52628937