Use unstable_hasStaticViewConfig to detect if a component is registered in the native app

Summary:
This diff is a revert of the stack D27276533. the native fix will be included as part of another diff

changelog: [internal] internal

Reviewed By: JoshuaGross, ShikaSD

Differential Revision: D27332513

fbshipit-source-id: 203051ea8fec3f508d79c329c9b61399fbbc3d1b
This commit is contained in:
David Vacca 2021-03-25 12:43:56 -07:00 коммит произвёл Facebook GitHub Bot
Родитель d754bdefc6
Коммит 07d527f9c5
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -70,7 +70,7 @@ jest
}
}),
hasViewManagerConfig: jest.fn(name => {
return name === 'AndroidDrawerLayout';
return true;
}),
measure: jest.fn(),
manageChildren: jest.fn(),

Просмотреть файл

@ -22,7 +22,7 @@ import type {ViewProps} from 'react-native/Libraries/Components/View/ViewPropTyp
// Verify that RCTSnapshot is part of the UIManager since it is only loaded
// if you have linked against RCTTest like in tests, otherwise we will have
// a warning printed out
const RCTSnapshot = UIManager.hasViewManagerConfig('RCTSnapshot')
const RCTSnapshot = UIManager.getViewManagerConfig('RCTSnapshot')
? require('../../../RCTTest/RCTSnapshotNativeComponent')
: View;