I need to navigate in redux-action. I'm try to implement an exit from an application. I always used react-native-router-flux before and not very familiar with react-navigation.
My code:
export const signOut = () => {
const nav = NavigationActions.navigate({
routeName: 'mainFlow', // It's navigation from drawer, so maybe I // don't need to specify this routeName?
action: NavigationActions.navigate({ routeName: 'intro' })
});
return () => {
try {
AsyncStorage.clear();
} finally {
AsyncStorage.getItem('token').then(function (response) {
console.log(response);
});
return nav;
}
}
};