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

SafeAreaView default style does not render #498

Closed SuhitAgarwal closed 1 month ago

SuhitAgarwal commented 1 month ago

If I add some custom styles to the SafeAreaView component, for example:

<SafeAreaView style={styles.pageContainer}>
  {...childComponents}
</SafeAreaView>

export const styles = StyleSheet.create({
  pageContainer: {
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

without a flex: 1, style, it fails to show the page at all.

I could be overwriting the default styles, in which case, external styles should be rendered as such so as to not overwrite it possibly

SuhitAgarwal commented 1 month ago

Nevermind, my SafeAreaView was rendered within a different component