Skip to content

Commit

Permalink
Lean Core: add removed message for ToolbarAndroid (facebook#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: facebook#26591

## Changelog

[General] [Deprecated] - Add warning message for trying to use ToolbarAndroid which has been removed from the core.
Pull Request resolved: facebook#27930

Differential Revision: D19690581

Pulled By: cpojer

fbshipit-source-id: 8e404fe62651fba4940199c74c45270d6e853740
  • Loading branch information
Naturalclar authored and osdnk committed Mar 9, 2020
1 parent 4e8b31a commit 07547ff
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 07547ff

Please sign in to comment.