React Native Expo StackNavigator overlaps Notification bar. We have to build this into react-navigation so it happens for you automatically.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import React, {Component} from 'react'; import {StatusBar, View} from 'react-native' import {StackNavigator} from 'react-navigation'; import Home from './app/screens/Home'; const RootNavigator = StackNavigator({ Home: { screen: Home } }) export default class App extends Component { render() { return ( <View style={{ flex: 1, marginTop: StatusBar.currentHeight }}> <RootNavigator /> </View> ) } } |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.