mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This diff removes the call to UIManager.getViewManagerConfig into the deprecatedPropType method when static view configs are enabled This was necessary to avoid innecessary calls to UIManager.getViewManagerConfig and to avoid loading UIManagerModule classes when static view configs are enabled changelog: [internal] internal Reviewed By: fkgozali, yungsters Differential Revision: D26040855 fbshipit-source-id: 82cad9f4abe9898e781fd989ebaa03497dad926b
44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @flow
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import UIManagerInjection from './UIManagerInjection';
|
|
import type {Spec} from './NativeUIManager';
|
|
|
|
interface UIManagerJSInterface extends Spec {
|
|
+getViewManagerConfig: (viewManagerName: string) => Object;
|
|
+hasViewManagerConfig: (viewManagerName: string) => boolean;
|
|
+createView: (
|
|
reactTag: ?number,
|
|
viewName: string,
|
|
rootTag: number,
|
|
props: Object,
|
|
) => void;
|
|
+updateView: (reactTag: number, viewName: string, props: Object) => void;
|
|
+manageChildren: (
|
|
containerTag: ?number,
|
|
moveFromIndices: Array<number>,
|
|
moveToIndices: Array<number>,
|
|
addChildReactTags: Array<number>,
|
|
addAtIndices: Array<number>,
|
|
removeAtIndices: Array<number>,
|
|
) => void;
|
|
}
|
|
|
|
const UIManager: UIManagerJSInterface =
|
|
global.RN$Bridgeless === true
|
|
? require('./DummyUIManager') // No UIManager in bridgeless mode
|
|
: UIManagerInjection.unstable_UIManager == null
|
|
? require('./PaperUIManager')
|
|
: UIManagerInjection.unstable_UIManager;
|
|
|
|
module.exports = UIManager;
|