Reputation: 1685
I would like to know how can I fire navigation actions in React Native (with the react-navigation-redux-helpers) ?
I tired to use NavigationActions.navigate({ routeName: 'App' }) function but nope :(
Upvotes: 0
Views: 827
Reputation: 1912
react-navigation
gives you action creators, see https://reactnavigation.org/docs/en/navigation-actions.html
import { NavigationActions } from 'react-navigation';
const navigateAction = NavigationActions.navigate({
routeName: 'Profile',
params: {},
action: NavigationActions.navigate({ routeName: 'SubProfileRoute' }),
});
this.props.navigation.dispatch(navigateAction);
Upvotes: 2