December 17, 2021
navigation.navigate('screenName')
navigation.navigate('screenName', {someParam: param})
Can be accessed by the hook:
const route = useRoute();
const someParam = route.params?.someParam
When navigating down in a stack, the merge option can be applied to only override the params that have the same name.
navigation.navigate('screenName', {
screen: 'innerScreen',
merge: true,
})
// or
navigation.navigate({
screen: 'screenName',
merge: true
})
If you want to navigate into another stack, and you want to have the navigation stack in a specifik order then you can navigate with the option initial.
navigation.navigate('screenName', {
screen: 'innerScreen',
initial: false,
})
This makes sure that navigation.goBack() navigates from innerScreen to screenName. If it is omitted, then the root screen of that stack will be innerScreen.
Aug 8, 2022
Dec 17, 2021
Feb 13, 2020
Jan 23, 2020
Jan 20, 2020
Nov 20, 2019