Documentation Index
Fetch the complete documentation index at: https://resources.devweekends.com/llms.txt
Use this file to discover all available pages before exploring further.
Module Overview
Estimated Time: 4 hours | Difficulty: Intermediate | Prerequisites: Core Components, Styling
- React Navigation setup
- Stack Navigator
- Tab Navigator
- Drawer Navigator
- Passing parameters
- Navigation TypeScript types
Navigation Architecture
Installation & Setup
Basic Setup
Stack Navigator
A stack navigator works exactly like a stack of physical cards on a desk. Navigating to a new screen places a card on top. Going back removes the top card, revealing the previous one. The native stack navigator (@react-navigation/native-stack) uses the actual native navigation controllers (UINavigationController on iOS, Fragment transactions on Android), which means you get native-quality animations and gestures (swipe-back on iOS) for free.
Basic Stack Navigation
Navigating Between Screens
Tab Navigator
Bottom tabs are the most common navigation pattern in mobile apps — Instagram, Twitter, Spotify, and most apps you use daily have them. Tabs let users switch between top-level sections with a single tap. Unlike stack navigation, switching tabs does not push a new screen; it swaps which section is visible while preserving the state of each tab independently.Bottom Tab Navigation
Custom Tab Bar
Drawer Navigator
Drawer navigation provides a slide-out menu, commonly used for settings, help, and secondary navigation. In practice, most modern apps have moved away from drawers as the primary navigation pattern (in favor of bottom tabs), but they remain useful for supplementary options. Think of a drawer as the “utility closet” of your app — accessible when needed but not the main path.TypeScript Navigation Types
Navigation is where TypeScript pays for itself many times over. Without types, passing the wrong params to a screen is a runtime crash that only surfaces when a user taps a specific button in a specific state. With types, the compiler catches it the moment you write the code. The pattern below centralizes all navigation types in one file and usesCompositeScreenProps to give screens type-safe access to navigators above them in the hierarchy.
Centralized Type Definitions
Using Typed Navigation
useNavigation Hook with Types
Navigation Patterns
Authentication Flow
Deep Linking
Best Practices
Type Everything
Use TypeScript for all navigation params and screen props
Organize by Feature
Group related screens and navigators together
Lazy Load Screens
Use React.lazy for screens not immediately needed
Handle Deep Links
Configure deep linking for better user experience
Next Steps
Module 9: Advanced Navigation
Learn advanced navigation patterns including nested navigators and custom transitions