0

As you know goBack sends you back to the previous screen. So where does this keep the information of the screen it will go back to? How can I find out the name of the screen that goBack will return to?

const InfoScreen = ({ navigation }) => {

    return (
        <SafeAreaView style={styles.safeArea}>
            <AppHeader onPressLeft={() => {
                navigation.goBack()
Ï            }}
            />
        </SafeAreaView>
    )
}

export default InfoScreen
Nemesis
  • 299
  • 1
  • 7
  • Does this answer your question? [How to get previous route name from React Navigation](https://stackoverflow.com/questions/55942600/how-to-get-previous-route-name-from-react-navigation) – user18309290 Dec 22 '22 at 17:00

0 Answers0