mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
ab843c5736
commit
0ab0c5a42e
@@ -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 (
|
||||
|
||||
@@ -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),
|
||||
};
|
||||
Reference in New Issue
Block a user