Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hiding the status bar with React Native

How do you hide the status bar for iOS or Android when developing with React Native? I've imported StatusBar, but I believe there is also StatusBarIOS and a StatusBar for Android.

like image 460
Rheisen Avatar asked Mar 23 '16 18:03

Rheisen


People also ask

How do I hide my status bar in react-native?

The hidden property can be used to hide the status bar. In our example it is set to false. This is default value. The barStyle can have three values – dark-content, light-content and default.


1 Answers

Figured out how to hide the status bar. First of all, StatusBarIOS is deprecated so you need to import StatusBar and then simply include this code snippet at the top of your render:

<StatusBar hidden /> 

React Native Docs on StatusBar

like image 84
Rheisen Avatar answered Oct 14 '22 06:10

Rheisen