Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 25.2k
Add deprecation warnings for a few IOS components#21901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
49a86415400a408a8a1e7a02c68bFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -12,11 +12,21 @@ | ||
| const React = require('React'); | ||
| const StyleSheet = require('StyleSheet'); | ||
| const TabBarItemIOS = require('TabBarItemIOS'); | ||
| const View = require('View'); | ||
| let showedDeprecationWarning = false; | ||
| class DummyTabBarIOS extends React.Component<$FlowFixMeProps> { | ||
| static Item = TabBarItemIOS; | ||
| componentDidMount() { | ||
| if (!showedDeprecationWarning) { | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How do you feel about the different places this could go? At the top level, constructor, componentDidMount, render. My feeling is that I'd prefer constructor or componentDidMount but I'm curious if you had thought about this already. | ||
| console.warn( | ||
| 'TabBarIOS and TabBarItemIOS are deprecated and will be removed in a future release. ' + | ||
| 'Please use react-native-tab-view instead.', | ||
| ); | ||
| showedDeprecationWarning = true; | ||
| } | ||
| } | ||
| render() { | ||
| return ( | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this caused Flow errors on Android:
I'll fix it