Skip to content

Commit 6249d14

Browse files
Naturalclarfacebook-github-bot
authored andcommitted
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: #26591 ## Changelog [General] [Deprecated] - Add warning message for trying to use ToolbarAndroid which has been removed from the core. Pull Request resolved: #27930 Differential Revision: D19690581 Pulled By: cpojer fbshipit-source-id: 8e404fe62651fba4940199c74c45270d6e853740
1 parent 82e8239 commit 6249d14

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

index.js

+13
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,19 @@ if (__DEV__) {
576576
},
577577
});
578578

579+
// $FlowFixMe This is intentional: Flow will error when attempting to access ToolbarAndroid.
580+
Object.defineProperty(module.exports, 'ToolbarAndroid', {
581+
configurable: true,
582+
get() {
583+
invariant(
584+
false,
585+
'ToolbarAndroid has been removed from React Native. ' +
586+
"It can now be installed and imported from '@react-native-community/toolbar-android' instead of 'react-native'. " +
587+
'See https://github.com/react-native-community/toolbar-android',
588+
);
589+
},
590+
});
591+
579592
// $FlowFixMe This is intentional: Flow will error when attempting to access ViewPagerAndroid.
580593
Object.defineProperty(module.exports, 'ViewPagerAndroid', {
581594
configurable: true,

0 commit comments

Comments
 (0)