To pass parameters to nested navigators with React Native, we call navigation.navigate
with an object with the params
property.
For instance, we write
navigation.navigate('Account', {
screen: 'Settings',
params: { user: 'jane' },
});
to set the params
property to an object with the data that we want to pass to the destination component.