Hide "Navigate up" when pressing back button with react-navigation / react-native-screens

54 Views Asked by At

how do i hide the "Navigate up" from the back button when using react-navigation? It happens when i keep the back button pressed.

Navigate up Image

"@react-navigation/native": "^5.9.4", "react-native": "0.71.12", "react-native-screens": "3.19.0",

import { NativeStackNavigationProp, createNativeStackNavigator } from 'react-native-screens/native-stack'

     const NowStack = createNativeStackNavigator()

    <NowStack.Navigator>
      <NowStack.Screen name="main" component={NowPlayingView} options={{ headerShown: false }} />
      <NowStack.Screen
        name="queue"
        component={NowPlayingQueue}
        options={{
          title: "Now",
          headerStyle: {
            backgroundColor: colors.gradient.high,
          },
          headerTitleStyle: {
            fontSize: 18,
            fontFamily: font.semiBold,
            color: colors.text.primary,
          },
          headerHideShadow: true,
          headerTintColor: 'white',
        }}
      />
    </NowPlayingStack.Navigator>

somewhere else

const navigation = useNavigation();

<PressableOpacity onPress={() => navigation.navigate('queue')} disabled={disabled} hitSlop={16}>
  <IconMatCom name="playlist-play" size={24} color="white" />
  <Text numberOfLines={1} style={controlsStyles.text}>
    Capitole
  </Text>
</PressableOpacity>
0

There are 0 best solutions below