mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
For Fabric with StaticViewConfigs, fix UIManager to use LazyUImanager, not PaperUIManager
Summary: Changelog: [JS] For Fabric with StaticViewConfigs, fix UIManager to use LazyUImanager, not PaperUIManager Reviewed By: fkgozali Differential Revision: D33459937 fbshipit-source-id: 4298be7e1e455856cbcf3162b100099cd8c9ce09
This commit is contained in:
1 parent
705236e363
commit
9daae5a5f2
2 files changed
+16
-11
No files matched your search
@@ -8,11 +8,10 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
import UIManagerInjection from './UIManagerInjection';
|
||||
import type {Spec} from './NativeUIManager';
|
||||
import type {RootTag} from 'react-native/Libraries/Types/RootTagTypes';
|
||||
|
||||
interface UIManagerJSInterface extends Spec {
|
||||
export interface UIManagerJSInterface extends Spec {
|
||||
+getViewManagerConfig: (viewManagerName: string) => Object;
|
||||
+hasViewManagerConfig: (viewManagerName: string) => boolean;
|
||||
+createView: (
|
||||
@@ -32,11 +31,15 @@ interface UIManagerJSInterface extends Spec {
|
||||
) => void;
|
||||
}
|
||||
|
||||
const UIManager: UIManagerJSInterface =
|
||||
global.RN$Bridgeless === true
|
||||
? require('./DummyUIManager') // No UIManager in bridgeless mode
|
||||
: UIManagerInjection.unstable_UIManager == null
|
||||
? require('./PaperUIManager')
|
||||
: UIManagerInjection.unstable_UIManager;
|
||||
var UIManager: UIManagerJSInterface;
|
||||
if (global.RN$Bridgeless === true) {
|
||||
// $FlowExpectedError[incompatible-type]
|
||||
UIManager = require('./DummyUIManager');
|
||||
} else {
|
||||
const {unstable_UIManager} = require('./UIManagerInjection');
|
||||
UIManager = unstable_UIManager
|
||||
? unstable_UIManager
|
||||
: require('./PaperUIManager');
|
||||
}
|
||||
|
||||
module.exports = UIManager;
|
||||
@@ -8,6 +8,8 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
export default {
|
||||
unstable_UIManager: (null: ?any),
|
||||
};
|
||||
import type {UIManagerJSInterface} from './UIManager';
|
||||
|
||||
const unstable_UIManager: ?UIManagerJSInterface = null;
|
||||
|
||||
export {unstable_UIManager};
|
||||
Reference in new issue
Block a user