Skip to content

Commit

Permalink
Lean Core: add removed message for ToolbarAndroid (#27930)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Naturalclar authored and facebook-github-bot committed Feb 3, 2020
1 parent 82e8239 commit 6249d14
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Object.defineProperty(module.exports, 'ViewPagerAndroid', {
configurable: true,
Expand Down

0 comments on commit 6249d14

Please sign in to comment.