Skip to main content
Version: 4.x

SwitchActions reference

SwitchActions is an object containing methods for generating actions specific to switch-based navigators. Its methods expand upon the actions available in NavigationActions.

The following actions are supported:

  • JumpTo - Jump to a route in the navigator

jumpTo‚Äč

The jumpTo action can be used to jump to an existing route in the switch navigator.

  • routeName - string - required - routeName of the route to jump to.
  • key - string - optional - If set, the action will be scoped to the switch-based navigator with the given key.
import { SwitchActions } from 'react-navigation';

this.props.navigation.dispatch(SwitchActions.jumpTo({ routeName }));