Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- }
- }
- };
- componentDidMount() {
- this.props.getData();
- }
- this.props.getData(this.props.navigation);
- const getData =(navigation) => {
- navigation.navigate('ToYourScreen');
- ...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement