I am using DrawerNavigator in https://reactnavigation.org/docs/navigators/drawer.
const MyApp = DrawerNavigator({
Home: {
screen: MyHomeScreen,
},
Notifications: {
screen: MyNotificationsScreen,
},
});
I have multiple screens that are using MyNotificationsScreen
component with different props.
How can I do something like:
const MyApp = DrawerNavigator({
Home: {
screen: MyHomeScreen,
},
Notifications1: {
screen: MyNotificationsScreen(propName=val1),
},
Notifications2: {
screen: MyNotificationsScreen(propName=val2),
},
});
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…