0

With expo I can import { Constants } from 'expo'; and set in styles paddingTop: Constants.statusBarHeight.

But we have <StatusBar /> Component in React Native.

I want to know is there some way to do that with React Natives <StatusBar /> Component's props not from style like in expo.

Edit: I don't want to get the status bar height. I want to know is there more better way to set my main View-s top padding as status bar height.

Robert Hovhannisyan
  • 2,938
  • 6
  • 21
  • 43
  • Can you explain a little more? Do you want an effect like expo in react native? – Muhammad Mehar May 20 '19 at 12:07
  • You want to know the height of the StatusBar? – hong developer May 20 '19 at 14:06
  • I want to know is there some props or other native mathods that I can use in `` Component, something like this: . Or something like the difference beetwen `` and ``. I don't know how can I explain more :D Thank You – Robert Hovhannisyan May 20 '19 at 14:34
  • Possible duplicate of [How to find height of status bar in Android through React Native?](https://stackoverflow.com/questions/35436643/how-to-find-height-of-status-bar-in-android-through-react-native) – sinan May 20 '19 at 18:43
  • https://docs.expo.io/versions/latest/guides/configuring-statusbar/ <= about statusbar – hong developer May 21 '19 at 14:25

0 Answers0