-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Add deprecation warnings for a few IOS components #21901
Changes from 3 commits
49a8641
5400a40
8a8a1e7
a02c68b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,13 +12,21 @@ | |
|
||
const React = require('React'); | ||
const StyleSheet = require('StyleSheet'); | ||
const TabBarItemIOS = require('TabBarItemIOS'); | ||
const View = require('View'); | ||
|
||
class DummyTabBarIOS extends React.Component<$FlowFixMeProps> { | ||
static Item = TabBarItemIOS; | ||
let showedDeprecationWarning = false; | ||
|
||
class DummyTabBarIOS extends React.Component<$FlowFixMeProps> { | ||
render() { | ||
if (!showedDeprecationWarning) { | ||
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; | ||
} | ||
|
||
return ( | ||
<View style={[this.props.style, styles.tabGroup]}> | ||
{this.props.children} | ||
|
This file was deleted.
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