Lean Core: add removed message for ToolbarAndroid (#27930)
Summary: Add warning message for development that is trying to use ToolbarAndroid that has been removed from ReactNative in 0.61 Ref: https://github.com/facebook/react-native/issues/26591 ## Changelog [General] [Deprecated] - Add warning message for trying to use ToolbarAndroid which has been removed from the core. Pull Request resolved: https://github.com/facebook/react-native/pull/27930 Differential Revision: D19690581 Pulled By: cpojer fbshipit-source-id: 8e404fe62651fba4940199c74c45270d6e853740
This commit is contained in:
Родитель
82e8239337
Коммит
6249d14a61
13
index.js
13
index.js
|
@ -576,6 +576,19 @@ if (__DEV__) {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// $FlowFixMe This is intentional: Flow will error when attempting to access ToolbarAndroid.
|
||||||
|
Object.defineProperty(module.exports, 'ToolbarAndroid', {
|
||||||
|
configurable: true,
|
||||||
|
get() {
|
||||||
|
invariant(
|
||||||
|
false,
|
||||||
|
'ToolbarAndroid has been removed from React Native. ' +
|
||||||
|
"It can now be installed and imported from '@react-native-community/toolbar-android' instead of 'react-native'. " +
|
||||||
|
'See https://github.com/react-native-community/toolbar-android',
|
||||||
|
);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
// $FlowFixMe This is intentional: Flow will error when attempting to access ViewPagerAndroid.
|
// $FlowFixMe This is intentional: Flow will error when attempting to access ViewPagerAndroid.
|
||||||
Object.defineProperty(module.exports, 'ViewPagerAndroid', {
|
Object.defineProperty(module.exports, 'ViewPagerAndroid', {
|
||||||
configurable: true,
|
configurable: true,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче