react-native-safe-area-context icon indicating copy to clipboard operation
react-native-safe-area-context copied to clipboard

SafeAreaView from react-native vs SafeAreaView from this lib

Open mohsinulhaq opened this issue 5 years ago • 2 comments

What's the difference between the two. If a safe area container is all I need and I don't care about the inset values, can the SafeAreaView from this lib be safely replaced by the SafeAreaView from RN without losing any features?

mohsinulhaq avatar Nov 24 '20 07:11 mohsinulhaq

I don't know the specifics of the actual implementation, but I've used both in a project and I've had significantly worse rendering with the React Native version. I find that this component renders with less clunkiness and components snapping into place.

That being said, try both in your project and see which renders in the Release variant. What worked for us might not work for everyone!

robertjcolley avatar Jan 11 '21 22:01 robertjcolley

This lib provides hooks to measure the insets/edges and dynamically choose to or not render over those insets. So it's more flexible. see doc https://github.com/th3rdwave/react-native-safe-area-context#usesafeareainsets

Megatron4537 avatar Jul 26 '21 21:07 Megatron4537

This version was taken from RN and more features were added. You most likely can use the RN one if you want

jacobp100 avatar Jan 19 '23 16:01 jacobp100