react-native-safe-area-context
react-native-safe-area-context copied to clipboard
"Margin collapse" in SafeAreaView?
Here's a suggestion. Currently SafeAreaView adds any margin specified by the component user to the safe area margin (assuming mode=margin here.) Sometimes it would be useful to take the maximum of the two margins instead. For example, for a toast at the top of the screen I might want to add some margin myself, but if the safe area margin is already bigger than that margin, then I would like to use that instead.
I know I can already achieve this with useSafeAreaInsets, but I'd like to avoid the caveats of the hook.