Check out example codes for "ios safe area". It will help you in understanding the concepts better.

Code Example 1

padding-top: max(12px, env(safe-area-inset-top));
padding-bottom: max(12px, env(safe-area-inset-bottom));
padding-left: max(12px, env(safe-area-inset-left));
padding-right: max(12px, env(safe-area-inset-right));

Learn ReactJs, React Native from akashmittal.com