Red Shift

The official Infinite Red publication for React Native design & development. We’re a fully distributed team building world-class apps for over 20 years for clients all around the world.

Follow publication

React Navigation Drawer Tutorial

Gant Laborde
Red Shift
Published in
7 min readAug 30, 2017

--

Part One:

Part Two:

Step 1: Add a basic react-navigation

This concludes Step 1! Review the full code for Step 1 here: https://github.com/GantMan/drawer-example/tree/step1

Step 2: Don’t Make a Junk Drawer

1. Will my drawer be available all the time?

2. Will my drawer navigate with stacks in a tab-like behavior?

Adding our Desired Drawer Stack

Identify Desired Navigation Structure:

Two main stacks

the header code renders like this.
Purple header for screens of a logged in user
Drawer accessible via gestures

Final touch: Add a menu button to open the drawer

headerLeft: <Text onPress={() => 
navigation.navigate('DrawerOpen')}>Menu</Text>
Drawer opens perfectly

This concludes Step 2! Review the full code for Step 2 here: https://github.com/GantMan/drawer-example/tree/step2

Blog Credits:

Part Two: Finishing the Drawer

🎉 About Gant

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Published in Red Shift

The official Infinite Red publication for React Native design & development. We’re a fully distributed team building world-class apps for over 20 years for clients all around the world.

Written by Gant Laborde

Software Consultant, Adjunct Professor, Published Author, Award Winning Speaker, Mentor, Organizer and Immature Nerd :D — Lately full of React Native Tech

Responses (31)

Write a response