th3rdwave / react-native-safe-area-context

A flexible way to handle safe area insets in JS. Also works on Android and Web!
MIT License
2.08k stars 191 forks source link

SafeAreaProvider as root of screens #467

Closed slavko-lukic closed 4 months ago

slavko-lukic commented 5 months ago

Screenshot 2024-01-26 at 12 12 56

What does this part mean exactly? Should safe area provider be at the route of every screen? I am using react navigation by the way

tboba commented 4 months ago

Hi @slavko-lukic, this means that every navigator that contains your screens should be wrapped with SafeAreaProvider. However, I don't think this is necessary now. Currently, every screen is being wrapped with the SafeAreaProvider by default - see https://github.com/software-mansion/react-native-screens/blob/da15ee60af4291b7069bee3dbdf4d7d7e98e2feb/src/native-stack/views/NativeStackView.tsx#L474.