SafeAreaView
that comes with react-native
only works on iOS devices, and only on iOS version 11 or later. Plus it can cause jumpy behaviour when a screen is animating (according to React Navigation docs)SafeAreaProvider
, SafeAreaView
and useSafeAreaInsets
etc, It works on Android as well as iOS.padding
to a SafeAreaView
because implementing it’s own padding is part of its behaviour. If you apply padding rules in styles, they’ll be ignored.View
inside a SafeAreaView
SafeArea
then expect weird behaviourSafeArea
is no longer exported by react-navigation
v5. Previously you could import { SafeAreaView } from "react-navigation"
If using default header, don’t use SafeArea
, default header handles both Android and iOS.
If you use default header and SafeArea
both, you get extra empty space at the top in nested headers.
On Android, React Navigation default header shows extra empty space at top when it’s a nested header
headerForceInset: { top: 'never', bottom: 'never' },
headerForceInset: { vertical: 'never' }, // get rid of extra empty space at top
SafeArea
, the screen gets inside the status bar