Skip to content

Instantly share code, notes, and snippets.

@daneharrigan
Created May 28, 2017 06:05
Show Gist options
  • Save daneharrigan/4e299c41ddb06c4318b84f0c8e1e47fc to your computer and use it in GitHub Desktop.
Save daneharrigan/4e299c41ddb06c4318b84f0c8e1e47fc to your computer and use it in GitHub Desktop.
// example navigating to content #4 with reset
const action = NavigationActions.reset({
index: 0,
actions: [
NavigationActions.navigate({ routeName: 'Example', params: { title: '4' }}),
],
});
// or example navigating to content #4 with navigate
const action = NavigationActions.navigate({
index: 0,
actions: [
NavigationActions.navigate({ routeName: 'Example', params: { title: '1' }}),
NavigationActions.navigate({ routeName: 'Example', params: { title: '2' }}),
NavigationActions.navigate({ routeName: 'Example', params: { title: '3' }}),
NavigationActions.navigate({ routeName: 'Example', params: { title: '4' }}),
],
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment