This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 54).
Expo DevMenu
A library that provides a developer menu for debug builds.
The expo-dev-menu can be used as a standalone library in any Expo project. It is especially useful in brownfield apps that don't need the full expo-dev-client launcher interface.
expo-dev-menu provides a developer menu UI for React Native apps that includes:
- A powerful and extensible menu UI accessible via shake gesture or three-finger long press
- Quick access to common development actions
- Support for custom menu items to extend functionality
Installation
- npx expo install expo-dev-menuIf you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Once installed, the developer menu is available in your debug builds. You can open it by:
- Shake gesture: Shake your device
- Three-finger long press: Long press with three fingers on the screen
- Programmatically: Call
DevMenu.openMenu()from your code
Extending the dev menu
The dev menu can be extended to include extra buttons by using the registerDevMenuItems API:
import { registerDevMenuItems } from 'expo-dev-menu'; const devMenuItems = [ { name: 'My Custom Button', callback: () => console.log('Hello world!'), }, ]; registerDevMenuItems(devMenuItems);
This will create a new section in the dev menu that includes the buttons you have registered:
Note: Subsequent calls of
registerDevMenuItemswill override all previous entries.
Using with expo-dev-client
If you are using development builds, install expo-dev-client instead. It includes expo-dev-menu along with additional development tools:
- A configurable launcher UI for switching between development servers
- Improved debugging tools
- Support for loading updates from EAS Update
- npx expo install expo-dev-clientFor more information, check the expo-dev-client reference.
API
import * as DevMenu from 'expo-dev-menu';
No API data file found, sorry!