Skip to main content
Version: 3.x

DrawerActions reference

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

The following actions are supported:

  • openDrawer - open the drawer
  • closeDrawer - close the drawer
  • toggleDrawer - toggle the state, ie. switch from closed to open and vice versa

Usage

import { DrawerActions } from 'react-navigation-drawer';

this.props.navigation.dispatch(DrawerActions.toggleDrawer());