Disable static ViewConfigs in bridge mode & enable for bridgeless mode - Remove __fbStaticViewConfig & UIManagerInjection

Summary: Changelog: [Internal]

Reviewed By: RSNara

Differential Revision: D33835081

fbshipit-source-id: ed625de3b2da73f98cdb9c9dc97086aa2c477e3a
This commit is contained in:
Paige Sun
2022-01-28 23:39:38 -08:00
committed by Facebook GitHub Bot
parent ab843c5736
commit 0ab0c5a42e
3 changed files with 6 additions and 20 deletions
+5 -3
View File
@@ -19,14 +19,16 @@ module.exports = {
'getViewManagerConfig is unavailable in Bridgeless, use hasViewManagerConfig instead. viewManagerName: ' +
viewManagerName,
);
if (viewManagerName === 'RCTVirtualText') {
if (
viewManagerName === 'RCTVirtualText' ||
viewManagerName === 'RCTShimmeringView'
) {
return {};
}
return null;
},
hasViewManagerConfig: (viewManagerName: string): boolean => {
const staticViewConfigsEnabled = global.__fbStaticViewConfig === true;
if (staticViewConfigsEnabled) {
if (global.__nativeComponentRegistry__hasComponent) {
return unstable_hasComponent(viewManagerName);
} else {
return (
+1 -2
View File
@@ -34,7 +34,6 @@ export interface UIManagerJSInterface extends Spec {
const UIManager: UIManagerJSInterface =
global.RN$Bridgeless === true
? require('./DummyUIManager')
: require('./UIManagerInjection').default.unstable_UIManager ??
require('./PaperUIManager');
: require('./PaperUIManager');
module.exports = UIManager;
@@ -1,15 +0,0 @@
/**
* Copyright (c) Meta Platforms, Inc. and 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
*/
import type {UIManagerJSInterface} from './UIManager';
export default {
unstable_UIManager: (null: ?UIManagerJSInterface),
};