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

setStatusBarHeight should trigger re-render #38

wants to merge 1 commit into
base: master


None yet
2 participants
Copy link

slorber commented Aug 14, 2018


On iOS the statusbar height might change (when calling someone, or when sharing network connection)

The following package permit to listen for such changes:
See also

If the height change during the lifetime of the app, we should rather make the safeArea views re-render so that the view does not appear under the statusbar extra height.

The idea is that I could write the following integration code to track correctly the statusbar:

export const trackStatusBarHeightChanges = async () => {
  const initialHeight = await StatusBarHeight.getAsync();
  const listener = height => SafeAreaView.setStatusBarHeight(height);
  return () => StatusBarHeight.removeEventListener(listener);

This comment has been minimized.

Copy link

slorber commented Aug 14, 2018

Ideally, I think adding expo/status-bar-height to this lib and doing the tracking by default could be helpful. Didn't want to add a new dependency to this lib, so please tell me if this makes sense. cc @EvanBacon


This comment has been minimized.

Copy link

brentvatne commented Sep 19, 2018

I'm waiting for facebook/react-native#20999 to solve this properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment