What is the use of SafeAreaProvider
? I didn't understand the github documentation.
For what i have to use it ? SafeAreaView
makes a nice job...
Even if SafeAreaProvider
must be used with React-navigation:
<SafeAreaView>
<SafeAreaProvider>
<NavigationContainer>
...
</NavigationContainer>
</SafeAreaProvider>
</SafeAreaView>
I do not see its use...
<SafeAreaProvider>
it is a React context provider, this is an away to pass props down, it will calculate the safe area once and pass it down to all SafeAreaViews
and hooks
like useSafeAreaInsets
safe areas is phone screen without notches, Such items include:
The area not overlapped by such items is referred to as "safe area".
you can see more example and images in reactnavigation.org here and you will understand.