-
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
Conversation
…arded to BackHandler since March 2018.
…recate-BackHandler
…t migrated off of haste yet.
render() { | ||
if (!showedDeprecationWarning) { |
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.
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.
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.
TheSavior is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
class DummyTabBarIOS extends React.Component<$FlowFixMeProps> { | ||
static Item = TabBarItemIOS; |
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:
Error ---------------------------------------------------------------------------
react-native/RNTester/js/TabBarIOSBarStyleExample.js:40:10
Cannot get `TabBarIOS.Item` because property `Item` is missing in statics of `DummyTabBarIOS` [1].
react-native/RNTester/js/TabBarIOSBarStyleExample.js:40:10
40| <TabBarIOS.Item title="Tab" icon={{uri: base64Icon, scale: 3}} selected>
^^^^^^^^^^^^^^
References:
react-native/Libraries/Components/TabBarIOS/TabBarIOS.android.js:19:7
19| class DummyTabBarIOS extends React.Component<$FlowFixMeProps> {
^^^^^^^^^^^^^^ [1]
Error -------- react-native/RNTester/js/TabBarIOSExample.js:49:10
Cannot get `TabBarIOS.Item` because property `Item` is missing in statics of `DummyTabBarIOS` [1].
react-native/RNTester/js/TabBarIOSExample.js:49:10
49| <TabBarIOS.Item
^^^^^^^^^^^^^^
References:
react-native/Libraries/Components/TabBarIOS/TabBarIOS.android.js:19:7
19| class DummyTabBarIOS extends React.Component<$FlowFixMeProps> {
^^^^^^^^^^^^^^ [1]
Error -------- react-native/RNTester/js/TabBarIOSExample.js:60:10
Cannot get `TabBarIOS.Item` because property `Item` is missing in statics of `DummyTabBarIOS` [1].
react-native/RNTester/js/TabBarIOSExample.js:60:10
60| <TabBarIOS.Item
^^^^^^^^^^^^^^
References:
react-native/Libraries/Components/TabBarIOS/TabBarIOS.android.js:19:7
19| class DummyTabBarIOS extends React.Component<$FlowFixMeProps> {
^^^^^^^^^^^^^^ [1]
Error -------- react-native/RNTester/js/TabBarIOSExample.js:73:10
Cannot get `TabBarIOS.Item` because property `Item` is missing in statics of `DummyTabBarIOS` [1].
react-native/RNTester/js/TabBarIOSExample.js:73:10
73| <TabBarIOS.Item
^^^^^^^^^^^^^^
References:
react-native/Libraries/Components/TabBarIOS/TabBarIOS.android.js:19:7
19| class DummyTabBarIOS extends React.Component<$FlowFixMeProps> {
^^^^^^^^^^^^^^ [1]
Found 4 errors
I'll fix it
@matthargett merged commit 1746448 into |
Summary: Pull Request resolved: facebook/react-native#21901 Differential Revision: D10502816 Pulled By: TheSavior fbshipit-source-id: 1890aa35251cff0ac2c15760ecd5aabeb7652558
Summary: Pull Request resolved: facebook#21901 Differential Revision: D10502816 Pulled By: TheSavior fbshipit-source-id: 1890aa35251cff0ac2c15760ecd5aabeb7652558
Test Plan:
Release Notes:
[IOS] [BREAKING] [TabBarIOS] - Report deprecation warning on use. Will be removed entirely soon.
[IOS] [BREAKING] [TabBarItemIOS] - Report deprecation warning on use. Will be removed entirely soon.
[IOS] [BREAKING] [VibrationIOS] - Report deprecation warning on use. Will be removed entirely soon.