Skip to content
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

refactor!: drop deprecated StatusBarIOS #31466

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 0 additions & 38 deletions Libraries/Components/StatusBar/StatusBarIOS.js

This file was deleted.

24 changes: 16 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ import typeof PixelRatio from './Libraries/Utilities/PixelRatio';
import typeof PushNotificationIOS from './Libraries/PushNotificationIOS/PushNotificationIOS';
import typeof Settings from './Libraries/Settings/Settings';
import typeof Share from './Libraries/Share/Share';
import typeof StatusBarIOS from './Libraries/Components/StatusBar/StatusBarIOS';
import typeof StyleSheet from './Libraries/StyleSheet/StyleSheet';
import typeof Systrace from './Libraries/Performance/Systrace';
import typeof ToastAndroid from './Libraries/Components/ToastAndroid/ToastAndroid';
Expand Down Expand Up @@ -404,13 +403,6 @@ module.exports = {
get Share(): Share {
return require('./Libraries/Share/Share');
},
get StatusBarIOS(): StatusBarIOS {
warnOnce(
'StatusBarIOS-merged',
'StatusBarIOS has been merged with StatusBar and will be removed in a future release. Use StatusBar for mutating the status bar',
);
return require('./Libraries/Components/StatusBar/StatusBarIOS');
},
get StyleSheet(): StyleSheet {
return require('./Libraries/StyleSheet/StyleSheet');
},
Expand Down Expand Up @@ -697,4 +689,20 @@ if (__DEV__) {
);
},
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no-trailing-spaces: Trailing spaces not allowed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prettier/prettier: Delete ··


/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
* attempting to access StatusBarIOS. */
/* $FlowFixMe[invalid-export] This is intentional: Flow will error when
* attempting to access StatusBarIOS. */
Object.defineProperty(module.exports, 'StatusBarIOS', {
configurable: true,
get() {
invariant(
false,
'StatusBarIOS has been removed from React Native. ' +
'Has been merged with StatusBar. ' +
'See https://reactnative.dev/docs/statusbar',
);
},
});
}