Skip to content

Commit 7ce0f40

Browse files
ecreethfacebook-github-bot
authored andcommitted
refactor!: drop deprecated StatusBarIOS (#31466)
Summary: This component has been merged with `StatusBar` and deprecated since [Jun 24, 2019](a833778) ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [JavaScript] [Removed] - refactor!: drop deprecated `StatusBarIOS` Pull Request resolved: #31466 Test Plan: Warning when user imports `StatusBarIOS` Reviewed By: yungsters Differential Revision: D30109324 Pulled By: lunaleaps fbshipit-source-id: fa2d3aa2cf35206ed8a196e09f12af57d3b61ccc
1 parent a169009 commit 7ce0f40

File tree

2 files changed

+22
-52
lines changed

2 files changed

+22
-52
lines changed

Libraries/Components/StatusBar/StatusBarIOS.js

-38
This file was deleted.

index.js

+22-14
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ import typeof PixelRatio from './Libraries/Utilities/PixelRatio';
7777
import typeof PushNotificationIOS from './Libraries/PushNotificationIOS/PushNotificationIOS';
7878
import typeof Settings from './Libraries/Settings/Settings';
7979
import typeof Share from './Libraries/Share/Share';
80-
import typeof StatusBarIOS from './Libraries/Components/StatusBar/StatusBarIOS';
8180
import typeof StyleSheet from './Libraries/StyleSheet/StyleSheet';
8281
import typeof Systrace from './Libraries/Performance/Systrace';
8382
import typeof ToastAndroid from './Libraries/Components/ToastAndroid/ToastAndroid';
@@ -384,13 +383,6 @@ module.exports = {
384383
get Share(): Share {
385384
return require('./Libraries/Share/Share');
386385
},
387-
get StatusBarIOS(): StatusBarIOS {
388-
warnOnce(
389-
'StatusBarIOS-merged',
390-
'StatusBarIOS has been merged with StatusBar and will be removed in a future release. Use StatusBar for mutating the status bar',
391-
);
392-
return require('./Libraries/Components/StatusBar/StatusBarIOS');
393-
},
394386
get StyleSheet(): StyleSheet {
395387
return require('./Libraries/StyleSheet/StyleSheet');
396388
},
@@ -679,17 +671,17 @@ if (__DEV__) {
679671
});
680672

681673
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
682-
* attempting to access Picker. */
674+
* attempting to access StatusBarIOS. */
683675
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
684-
* attempting to access Picker. */
685-
Object.defineProperty(module.exports, 'Picker', {
676+
* attempting to access StatusBarIOS. */
677+
Object.defineProperty(module.exports, 'StatusBarIOS', {
686678
configurable: true,
687679
get() {
688680
invariant(
689681
false,
690-
'Picker has been removed from React Native. ' +
691-
"It can now be installed and imported from '@react-native-picker/picker' instead of 'react-native'. " +
692-
'See https://github.com/react-native-picker/picker',
682+
'StatusBarIOS has been removed from React Native. ' +
683+
'Has been merged with StatusBar. ' +
684+
'See https://reactnative.dev/docs/statusbar',
693685
);
694686
},
695687
});
@@ -709,4 +701,20 @@ if (__DEV__) {
709701
);
710702
},
711703
});
704+
705+
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
706+
* attempting to access Picker. */
707+
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
708+
* attempting to access Picker. */
709+
Object.defineProperty(module.exports, 'Picker', {
710+
configurable: true,
711+
get() {
712+
invariant(
713+
false,
714+
'Picker has been removed from React Native. ' +
715+
"It can now be installed and imported from '@react-native-picker/picker' instead of 'react-native'. " +
716+
'See https://github.com/react-native-picker/picker',
717+
);
718+
},
719+
});
712720
}

0 commit comments

Comments
 (0)