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:
Родитель
d754bdefc6
Коммит
07d527f9c5
|
@ -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;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче