How it works...

When you open the application, the initial route is shown. There are several options you can provide, such as initialRouteName to specify which should be the first shown view, order to rearrange the drawer items, and even a custom contentComponent if you want to draw the contents of the drawer by yourself; all in all, there is lots of flexibility. Your first screen should look like the following:

Our drawer navigator showing the initial screen

The usual way to open a drawer is by sliding from the left (although you can also set the drawer to slide in from the right). We also provided the hamburger icon to toggle the drawer ...

Get Modern JavaScript Web Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.