Thuta Learning
React Native
IntermediateMobile DevelopmentIntermediate

Tab & Drawer Navigation

React NativeLesson 1220 min

What you'll walk away with

  • Explain the React and native-platform behavior of Tab & Drawer Navigation
  • Test accessibility, failure, and lifecycle cases
  • Write maintainable, testable, and performant React Native

Explain it simply

Tab & Drawer Navigation, in plain language

The Bottom Tab Navigator shows an app's major sections (Home, Search, Profile) as tab icons at the bottom of the screen, and each tab can carry its own Stack Navigator (the nested navigator pattern). The Drawer Navigator implements a side menu (the one that slides out from the side when you tap the hamburger icon) — it's typically used for settings and secondary features.

Problem → Why → Solution

The problem — why this concept matters

Cramming too many screens into the Bottom Tab (more than 5) and overloading the UX — keep it under 5 tab items

A common mistake

Not thinking through the architecture before setting up a nested navigator (a Stack inside a Tab)

Core concept — understand how it works

For Tab & Drawer Navigation, separate ownership of navigation, form, server, and device state. Test rapid taps, back gestures, deep links, process restarts, keyboard use, and screen-reader flows.

Mental model
  1. route or action
  2. navigator
  3. screen state

Explain the React and native-platform behavior of Tab & Drawer Navigation

Core syntax or pattern

javascript
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import HomeScreen from './HomeScreen';
import ProfileScreen from './ProfileScreen';

const Tab = createBottomTabNavigator();

function MainTabs() {
  return (
    <Tab.Navigator>
      <Tab.Screen name="Home" component={HomeScreen} />
      <Tab.Screen name="Profile" component={ProfileScreen} />
    </Tab.Navigator>
  );
}

For Tab & Drawer Navigation, separate ownership of navigation, form, server, and device state. Test rapid taps, back gestures, deep links, process restarts, keyboard use, and screen-reader flows.

Read the code step by step

  1. route or actionimport { createBottomTabNavigator } from '@react-navi...

    The Bottom Tab Navigator shows an app's major sections (Home, Search, Profile) as tab icons at the bottom of the screen, and each tab can carry its own Stack Navigator (the nested navigator pattern). The Drawer Navigator implements a side menu (the one that slides out from the side when you tap the hamburger icon) — it's typically used for settings and secondary features.

  2. navigator<Tab.Navigator>

    For Tab & Drawer Navigation, separate ownership of navigation, form, server, and device state. Test rapid taps, back gestures, deep links, process restarts, keyboard use, and screen-reader flows.

  3. screen state}

    Test an original Tab & Drawer Navigation example on Android and iOS with small and large screens, font scaling, dark mode, keyboard and screen reader use, slow/offline networking, denied permissions, and background/foreground transitions. Use DevTools, tests, and a release build where relevant.

Execution flow
  1. route or action
  2. navigator
  3. screen state

Success

Explain the React and native-platform behavior of Tab & Drawer Navigation

Failure

Cramming too many screens into the Bottom Tab (more than 5) and overloading the UX — keep it under 5 tab items

Let's think about it this way for a second

The Bottom Tab Navigator shows an app's major sections (Home, Search, Profile) as tab icons at the bottom of the screen, and each tab can carry its own Stack Navigator (the nested navigator pattern). The Drawer Navigator implements a side menu (the one that slides out from the side when you tap the hamburger icon) — it's typically used for settings and secondary features.

Let's connect this to a real-world scenario

Instagram/Twitter-type apps most commonly use a Bottom Tab (Home, Search, Notifications, Profile) — it's a standard mobile UX pattern because it's easy to reach with your thumb at the bottom of the phone. With nested navigation (nesting a Stack inside a Tab), tapping a post in the Home tab pushes a Detail screen from the Home tab's own stack, while the Tab bar stays put.

Code Example

javascript
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import HomeScreen from './HomeScreen';
import ProfileScreen from './ProfileScreen';

const Tab = createBottomTabNavigator();

function MainTabs() {
  return (
    <Tab.Navigator>
      <Tab.Screen name="Home" component={HomeScreen} />
      <Tab.Screen name="Profile" component={ProfileScreen} />
    </Tab.Navigator>
  );
}
You should see
Two tab icons — Home and Profile — appear at the bottom of the app, and tapping one switches the screen.

Try it in 5 minutes

Install createBottomTabNavigator and build two tabs — Home and Profile — yourself.

A quick word of caution

When building a Bottom Tab Navigator, watch out for the package name difference — @react-navigation/native-stack (Stack) vs @react-navigation/bottom-tabs (Tab) — get the install command wrong and you'll hit an import error.

Real-world usage

How to apply it in a real project

Test an original Tab & Drawer Navigation example on Android and iOS with small and large screens, font scaling, dark mode, keyboard and screen reader use, slow/offline networking, denied permissions, and background/foreground transitions. Use DevTools, tests, and a release build where relevant.

Mini challenge

Build it yourself

Test an original Tab & Drawer Navigation example on Android and iOS with small and large screens, font scaling, dark mode, keyboard and screen reader use, slow/offline networking, denied permissions, and background/foreground transitions. Use DevTools, tests, and a release build where relevant.

  • Rebuild the example without copying it
  • Test a normal input and an edge case
  • Predict the compiler or output result before running it
javascript
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import HomeScreen from './HomeScreen';
import ProfileScreen from './ProfileScreen';

const Tab = createBottomTabNavigator();

function MainTabs() {
  return (
    <Tab.Navigator>
      <Tab.Screen name="Home" component={HomeScreen} />
      <Tab.Screen name="Profile" component={ProfileScreen} />
    </Tab.Navigator>
  );
}

Expected: Explain the React and native-platform behavior of Tab & Drawer Navigation

Show hint

Test an original Tab & Drawer Navigation example on Android and iOS with small and large screens, font scaling, dark mode, keyboard and screen reader use, slow/offline networking, denied permissions, and background/foreground transitions. Use DevTools, tests, and a release build where relevant.

Quick quiz 1 / 3

What best describes the core idea of Tab & Drawer Navigation?

Quick quiz 2 / 3

Which mistake should you avoid first?

Quick quiz 3 / 3

How should this be applied in a real project?

What to remember

  • route or action → navigator → screen state
  • For Tab & Drawer Navigation, separate ownership of navigation, form, server, and device state. Test rapid taps, back gestures, deep links, process restarts, keyboard use, and screen-reader flows.
  • Cramming too many screens into the Bottom Tab (more than 5) and overloading the UX — keep it under 5 tab items
  • Test an original Tab & Drawer Navigation example on Android and iOS with small and large screens, font scaling, dark mode, keyboard and screen reader use, slow/offline networking, denied permissions, and background/foreground transitions. Use DevTools, tests, and a release build where relevant.

React Native Documentation — React Native

Easy traps

  • Cramming too many screens into the Bottom Tab (more than 5) and overloading the UX — keep it under 5 tab items
  • Not thinking through the architecture before setting up a nested navigator (a Stack inside a Tab)
  • Assuming one simulator's happy path proves every real-device, release-build, permission, accessibility, offline, and lifecycle path.

Hands-on Exercise

Test an original Tab & Drawer Navigation example on Android and iOS with small and large screens, font scaling, dark mode, keyboard and screen reader use, slow/offline networking, denied permissions, and background/foreground transitions. Use DevTools, tests, and a release build where relevant.

You'll know it worked when: Two tab icons — Home and Profile — appear at the bottom of the app, and tapping one switches the screen.

Updated on

Progress is saved only in this browser on this device. It isn't synced to other devices.

Report a problem with this lessonOpens your email app with this lesson's address filled in — nothing is sent until you send it.

Tab & Drawer Navigation | Thuta Learning