Skip to content

Safe Area Ignored in React Native 0.77, New Architecture Enabled #12455

Description

@anultravioletaurora

Current behavior

On react-native:0.77, with the New Architecture enabled, my bottom tabs and native stack navigators are ignoring the safe area. I have a SafeAreaProvider at the top of my app, with my NavigationContainer nested in it as follows:

  return (
    <SafeAreaProvider>
      <NavigationContainer theme={isDarkMode ? JellifyDarkTheme : JellifyLightTheme}>
        { loggedIn ? (
          <PlayerProvider>
            <Navigation />
          </PlayerProvider>
         ) : (
           <JellyfinAuthenticationProvider>
            <Login /> 
          </JellyfinAuthenticationProvider>
        )}
        <SafeToastViewport />
      </NavigationContainer>
    </SafeAreaProvider>
  )

Image
Image

Expected behavior

Safe Areas respected and avoided

Reproduction

https://github.com/anultravioletaurora/Jellify/tree/64-support-react-natives-new-architecture

Platform

  • Android
  • iOS
  • Web
  • Windows
  • MacOS

Packages

  • @react-navigation/bottom-tabs
  • @react-navigation/drawer
  • @react-navigation/material-top-tabs
  • @react-navigation/stack
  • @react-navigation/native-stack
  • react-native-drawer-layout
  • react-native-tab-view

Environment

  • I've removed the packages that I don't use
package version
@react-navigation/native ^7.0.14
@react-navigation/bottom-tabs ^7.2.0
@react-navigation/drawer N/A
@react-navigation/material-top-tabs N/A
@react-navigation/stack ^7.1.1
@react-navigation/native-stack ^7.2.0
react-native-drawer-layout N/A
react-native-tab-view N/A
react-native-screens ^4.8.0
react-native-safe-area-context ^5.2.0
react-native-gesture-handler ^2.24.0
react-native-reanimated ^4.0.0-beta.2
react-native-pager-view N/A
react-native 0.77.0
expo ^52.0.37
node 20
npm or yarn npm

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions