This is a general question to all who are using react navigation, following is my navigation structure
export const createRootNavigator = (signedIn = false) => {
return StackNavigator({
Login: screen: Login,
Welcome: screen: Welcome,
Loading: screen: Loading,
SignedIn: screen: SignedIn,
});
};
export const SignedIn = TabNavigator ({
Home: screen: HomeNavigation,
FeedBack: screen: FeedBackNavigation,
Search: screen: SearchNavigation,
Me: screen: ProfileNavigation,
});
I am using 'react-native-fcm' to receive the notification when app is in foreground or closed. How should I structure the code to navigate to specific screens upon receiving notification? Shall I subscribe to onNotification in every screen and then navigate to specific screen or have it at a centralised place? Has anyone tackled this before? sample code would be great
software version:
react-navigation 1.0.0-beta.26
react-native 0.49.3