65 SECTIONS · 1822 TOPICS
React Native Roadmap
Setting Up Development Environment
- 1. Installing React Native CLI
- Example: Create a new React Native project
- 2. Setting Up Android Studio
- Example: Install Android Studio
- Summary of Setup Steps
- 3. Setting Up Xcode
- Example: Verify Installation
- Key Points
- 4. Configuring Metro Bundler
- Example: Basic metro.config.js
- Key Configuration Points
- 5. Setting Up TypeScript
- Example: Project Setup with TypeScript
- Example: Basic Component with Types
- 6. Configuring ESLint and Prettier
- Example: ESLint Configuration
- Example: Prettier Configuration
- 7. Setting Up Environment Variables
- Example: Setting Environment Variables in .env File
- 8. Initializing New Project
- Example: Create a new React Native project
- 9. Configuring Watchman
- Example: Install and Configure Watchman
- 10. Using React Native Doctor
- Example: Run React Native Doctor
- 11. Setting Up Flipper
- Example: Install Flipper
- 12. Configuring Path Aliases
- Example: Setting up path aliases in tsconfig.json
- Example: Using path aliases in code
Using Expo vs React Native CLI
- 1. Understanding Expo Managed Workflow
- Example: Setting up an Expo Project
- Key Benefits of Expo Managed Workflow
- 2. Understanding Bare Workflow
- Example: Bare Workflow Project Structure
- 3. Using Expo CLI
- Example: Initializing an Expo Project
- 4. Ejecting from Expo
- Example: Ejecting from Expo
- Post-Eject Considerations
- 5. Using Expo Go App
- Example: Running an Expo Project on Device
- 6. Configuring app.json
- Example: Basic app.json structure
- 7. Using Expo SDK Features
- 8. Handling Native Code
- Example: Adding a Native Module
- Example: iOS Native Module Integration
- Example: Android Native Module Integration
- Native Code Handling Strategies
- 9. Comparing Build Processes
- Example: Building with Expo
- Example: Building with React Native CLI
- 10. Choosing the Right Workflow
- Expo vs React Native CLI
- When to Use Which
Working with Core Components
- 1. Using View Component
- Example: Basic View Usage
- Example: Nested Views with Styles
- 2. Using Text Component
- Example: Basic Text Component Usage
- Example: Text with Ellipsis
- 3. Using Image Component
- Example: Basic Image Usage
- Example: Local Image
- 4. Using ScrollView Component
- Example: Basic ScrollView Usage
- 5. Using TextInput Component
- Example: Basic TextInput
- Example: Password Input
- Example: Multiline Text Input
- 6. Using Button Component
- Example: Basic Button Usage
- Example: Button with Disabled State
- 7. Using Pressable Component
- Example: Basic Pressable Usage
- Example: Pressable with Long Press
- 8. Using SafeAreaView Component
- Example: Basic SafeAreaView Usage
- 9. Using Modal Component
- Example: Basic Modal Usage
- Example: Modal with ScrollView
- 10. Using ActivityIndicator Component
- Example: Basic Usage
- Example: Conditional Rendering
- 11. Using Switch Component
- Example: Basic Switch Usage
- Example: Custom Switch Colors
- 12. Using StatusBar Component
- Example: Basic StatusBar Usage
Styling with StyleSheet
- 1. Creating Styles
- Example: Basic StyleSheet Creation
- 2. Using Inline Styles
- Example: Basic inline style usage
- 3. Combining Multiple Styles
- Example: Combining Styles with StyleSheet.flatten
- 4. Understanding Style Inheritance
- Example: Style Inheritance in Flexbox
- Key Points About Style Inheritance
- 5. Using Absolute Positioning
- Example: Absolute Positioning
- 6. Applying Transforms
- Example: Applying Rotation and Scale
- Example: Using translateX and translateY
- 7. Working with Colors
- Example: Using Color Values
- 8. Using Shadows
- Example: Applying Shadows
- 9. Applying Border Styles
- Example: Basic Border
- Example: Dashed Border
- 10. Using Opacity and Visibility
- Example: Setting Opacity
- Example: Using Visibility
- 11. Creating Dynamic Styles
- Example: Conditional Style Application
- Example: Using Style Arrays
- 12. Using StyleSheet.flatten Method
- Example: Flattening Nested Styles
Implementing Flexbox Layouts
- 1. Understanding Flex Direction
- Example: Setting flexDirection
- 2. Using Justify Content
- Example: justifyContent center
- 3. Using Align Items
- Example: alignItems = 'center'
- 4. Using Flex Wrap
- Example: Basic Flex Wrap
- Example: Wrap Reverse
- 5. Setting Flex Grow and Shrink
- Example: Using flexGrow and flexShrink
- 6. Using Align Self
- Example: Align Self Property
- 7. Implementing Space Distribution
- Example: justifyContent with space-between
- Example: alignItems with stretch
- 8. Using Flex Basis
- Example: Setting flexBasis to 'auto'
- Example: Setting flexBasis to a fixed value
- 9. Creating Responsive Layouts
- Example: Basic Responsive Container
- Example: Responsive Grid Layout
- Workflow: Implementing Responsive Layouts
- 10. Handling Aspect Ratio
- Example: Setting Aspect Ratio
- 11. Using Gap Properties
- Example: Setting Gap in a Flexbox Container
Handling Dimensions and Responsiveness
- 1. Using Dimensions API
- Example: Getting Screen Dimensions
- 2. Using useWindowDimensions Hook
- Example: Using useWindowDimensions
- 3. Implementing Percentage-based Sizing
- Example: Percentage-based layout
- 4. Detecting Orientation Changes
- Example: Detecting Orientation Changes
- Key Points
- 5. Creating Platform-specific Dimensions
- Example: Platform-specific dimension logic
- Example: Using Platform.select for style differences
- Platform-specific Dimension Tips
- 6. Using PixelRatio API
- Example: Using PixelRatio to scale elements
- 7. Implementing Responsive Typography
- Example: Using Dimensions for Font Size
- Example: Responsive Typography with Scaling
- 8. Using Screen Size Breakpoints
- Example: Using Breakpoints in Styles
- 9. Handling Tablet vs Phone Layouts
- Example: Detecting Device Type
- Example: Conditional Styling
- Best Practices for Tablet vs Phone Layouts
- 10. Creating Adaptive Components
- Example: Using Dimensions to Create Responsive Layouts
- Example: Adaptive Component with Conditional Styling
Handling App Orientation
- 1. Locking Screen Orientation
- Example: Lock to Portrait Mode
- 2. Detecting Orientation Changes
- Example: Listen for Orientation Changes
- 3. Handling Orientation in Android Manifest
- Example: Setting Orientation in AndroidManifest.xml
- 4. Handling Orientation in Info.plist
- Example: Info.plist Configuration
- 5. Using useWindowDimensions for Orientation
- Example: Detecting Orientation Change
- 6. Implementing Orientation-specific Layouts
- Example: Using Dimensions API for Responsive Layouts
- Example: Conditional Rendering Based on Orientation
- Key Considerations for Orientation-specific Layouts
- 7. Using react-native-orientation-locker
- Example: Locking Orientation to Portrait
- 8. Handling Keyboard in Landscape Mode
- Example: Handling Keyboard in Landscape Mode
- 9. Managing Navigation Bar Orientation
- Example: Setting Navigation Bar Properties
- 10. Testing Orientation Changes
- Example: Detecting Orientation Change
- Example: Using useWindowDimensions Hook
Working with Platform-Specific Code
- 1. Using Platform.OS
- Example: Detecting Platform
- 2. Using Platform.select Method
- Example: Using Platform.select for Conditional Rendering
- Example: Using Platform.select for Component Differences
- 3. Creating Platform-specific Files
- Example: Platform-specific file naming
- 4. Using Platform.Version
- Example: Checking Platform Version
- 5. Handling Platform-specific Styles
- Example: Platform-specific style properties
- 6. Implementing Conditional Rendering
- Example: Conditional rendering with ternary operator
- 7. Using PlatformColor
- Example: Using PlatformColor
- 8. Handling Platform-specific APIs
- 9. Creating Universal Components
- Example: Platform-specific component rendering
- Example: Using Platform.select()
- 10. Testing Platform-specific Code
- Example: Platform-specific test setup
- Testing Platform-specific Code
Working with Custom Fonts and Icons
- 1. Installing Custom Fonts
- Example: Adding a custom font to a React Native project
- 2. Linking Font Files
- Example: Adding a Custom Font
- 3. Using Custom Fonts
- Example: Applying Custom Font
- 4. Installing Vector Icons
- Example: Installing Vector Icons
- Installation Steps
- 5. Using Icon Components
- Example: Using react-native-vector-icons
- Comparison: Icon Libraries
- 6. Creating Custom Icon Sets
- Example: Basic Icon Component
- Example: Using Vector Icons
- 7. Styling Icons
- Example: Basic Icon Styling
- Example: Icon with Custom Font Size
- 8. Using Icons in Buttons and Tabs
- Example: Button with Icon
- Example: Tab with Icon
- 9. Implementing Icon Fonts
- Example: Adding Icon Font to Project
- Example: Using Custom Icon Font
- Example: Custom Icon Size and Color
- 10. Optimizing Font Loading
- Example: Preloading Fonts with react-native-fonts
- Best Practices for Font Loading
Working with SVG and Vector Graphics
- 1. Installing react-native-svg
- Example: Install react-native-svg
- 2. Creating SVG Components
- Example: Basic SVG Component
- Example: SVG with Gradient
- 3. Using SVG Icons from Files
- Example: Importing and Using an SVG Icon
- 4. Implementing Animated SVGs
- Example: Basic Animated SVG
- Example: Animated Path with Easing
- 5. Creating Custom Shapes
- Example: Custom SVG Shape
- 6. Using Linear and Radial Gradients
- Example: Basic Linear Gradient
- Example: Radial Gradient
- 7. Handling SVG Transformations
- Example: Applying Transformations to an SVG Path
- Example: Using Transform with Animated Values
- 8. Creating SVG Charts
- Example: Basic Bar Chart with React Native SVG
- Example: Line Chart with Data Points
- 9. Optimizing SVG Performance
- Example: Using
- Example: Pre-caching SVG assets
- Performance Tips
- 10. Using SVGR for Component Generation
- Example: Converting SVG to React Component
- Example: Generated Component
Working with React Hooks
- 1. Using useState Hook
- Example: Counter Component
- 2. Using useEffect Hook
- Example: Basic useEffect usage
- Example: useEffect with cleanup
- Example: useEffect with dependencies
- 3. Using useContext Hook
- Example: Using useContext to access theme
- 4. Using useRef Hook
- Example: Managing focus with useRef
- Example: Storing a timer ID
- 5. Using useMemo Hook
- Example: Memoizing a Computation
- 6. Using useCallback Hook
- Example: Basic useCallback Usage
- Key Points
- 7. Creating Custom Hooks
- Example: Custom Hook for Fetching Data
- 8. Using useLayoutEffect Hook
- Example: Reading DOM Dimensions
- 9. Using useImperativeHandle Hook
- Example: Custom ref with useImperativeHandle
- Example: Using ref in parent component
- 10. Understanding Hook Rules and Best Practices
- Best Practices Summary
Managing Component State
- 1. Using useState for Local State
- Example: Basic useState Usage
- Example: State with Object
- Example: State with Array
- 2. Understanding State Updates
- 3. Using useReducer for Complex State
- Example: Basic useReducer Setup
- Example: Handling Async Actions
- 4. Implementing State Lifting
- Example: Lifting State Up
- State Lifting vs Local State
- Steps to Implement State Lifting
- 5. Managing Derived State
- Example: Using useMemo for Derived State
- Example: Derived State with Context
- Derived State vs Direct State
- 6. Handling State Immutability
- Example: Updating Nested State
- 7. Using Functional Updates
- Example: Functional Update with useState
- 8. Avoiding State Mutations
- Example: Correct State Update Using Spread Operator
- Example: Using Immer for Easier Immutable Updates
- Best Practices for State Mutations
- 9. Managing Multiple State Variables
- Example: Using Multiple State Variables
- Best Practices for Multiple State Variables
- 10. Implementing State Persistence
- Example: Using AsyncStorage for Local Storage
- Example: Using Redux Persist with React Native
- Comparison: AsyncStorage vs. SQLite vs. Redux Persist
Working with Context API
- 1. Creating Context
- Example: Creating a Theme Context
- 2. Providing Context Values
- Example: Basic Context Provider
- Example: Context with State
- 3. Consuming Context
- Example: Basic Context Consumption
- Example: Multiple Contexts
- 4. Implementing Global State
- Example: Basic Context Setup
- Example: Using Context in Components
- Best Practices for Global State with Context
- 5. Avoiding Context Re-renders
- Example: Unnecessary re-renders with Context
- Example: Using React.memo with Context
- Best Practices for Context Re-render Avoidance
- 6. Using Multiple Contexts
- Example: Combining Multiple Contexts
- 7. Creating Context with Default Values
- Example: Creating Context with Default Values
- 8. Implementing Context Composition
- Example: Basic Context Composition
- Best Practices for Context Composition
- 9. Using Context for Theming
- Example: Basic Theme Context Setup
- Example: Consuming Theme in Components
- Best Practices for Theming with Context
- 10. Optimizing Context Performance
- Example: Basic Context Usage (Not Optimized)
- Example: Optimized Context with Memoization
- Best Practices for Context Performance
Implementing State Management Libraries
- 1. Setting Up Redux Toolkit
- Example: Basic Redux Toolkit Setup
- Example: Slice Creation
- Setup Steps
- 2. Creating Slices
- Example: Creating a Slice
- 3. Using useSelector and useDispatch
- Example: Basic usage of useSelector and useDispatch
- Key Points
- 4. Implementing Async Actions
- Example: Using Redux with Async Actions
- Example: Using React Context with Async Actions
- 5. Using Zustand for Lightweight State
- Example: Basic Store Setup
- Example: Async Actions
- Key Features of Zustand
- 6. Using Jotai for Atomic State
- Example: Basic Jotai Setup
- Example: Async Atom
- Example: Derived State
- Key Features of Jotai
- 7. Implementing Persist Middleware
- Example: Redux Persist Setup
- Example: Using with React Navigation
- 8. Using Recoil for React State
- Example: Basic Recoil Setup
- Key Concepts in Recoil
- 9. Managing Global UI State
- Example: Zustand UI State Management
- Example: Jotai UI State Management
- 10. Choosing State Management Approach
- State Management Options in React Native
- Decision Factors
Handling User Input and Forms
- 1. Controlling TextInput
- Example: Basic TextInput Control
- Example: Multiline TextInput
- 2. Handling Keyboard Events
- Example: Basic Key Handling
- 3. Managing Keyboard Visibility
- Example: Handling Keyboard Events
- Example: Using KeyboardAvoidingView
- Keyboard Visibility Management Tips
- 4. Using KeyboardAvoidingView
- Example: Basic Usage of KeyboardAvoidingView
- 5. Implementing Form Validation
- Example: Basic Form Validation with useState
- Form Validation Best Practices
- 6. Handling Multi-line Input
- Example: Multi-line Text Input
- 7. Using Secure Text Entry
- Example: Secure Password Input
- 8. Implementing Auto-focus and Tab Navigation
- Example: Auto-focusing a TextInput on Component Mount
- Example: Managing Tab Navigation Between Inputs
- Best Practices for Auto-focus and Tab Navigation
- 9. Handling Input Masking
- Example: Phone Number Input with Mask
- Comparison: Manual vs Library-Based Masking
- 10. Managing Form State
- Example: Basic form with useState
- Example: Using useReducer for form state
- 11. Dismissing Keyboard
- Example: Dismissing Keyboard on Background Tap
Working with List Components
- 1. Using FlatList Component
- Example: Basic FlatList Usage
- Example: FlatList with Horizontal Layout
- 2. Using SectionList Component
- Example: Basic SectionList Usage
- 3. Implementing List Optimization
- Example: Using FlatList with keyExtractor
- Example: Using SectionList for grouped lists
- Optimization Workflow
- 4. Handling Pull to Refresh
- Example: Pull to Refresh Implementation
- 5. Implementing Infinite Scroll
- Example: Basic Infinite Scroll with FlatList
- 6. Using List Header and Footer
- Example: Basic List with Header and Footer
- 7. Handling Empty States
- Example: Basic Empty State Component
- Empty State Implementation Workflow
- 8. Using VirtualizedList Component
- Example: Basic VirtualizedList Usage
- Example: Using getItemLayout for Performance
- 9. Implementing Item Separators
- Example: Using ItemSeparatorComponent
- 10. Optimizing List Performance
- Example: Using
- 11. Using FlashList for Performance
- Example: Basic FlashList Usage
Working with Touchables and Gestures
- 1. Using Pressable Component
- Example: Basic Pressable Usage
- Example: Using onPressIn and onPressOut
- 2. Understanding Touch Event System
- Example: Basic Touch Event Handling
- 3. Implementing Long Press
- Example: Basic Long Press Implementation
- Long Press Best Practices
- 4. Handling Double Tap
- Example: Double Tap Handler
- 5. Creating Swipeable Components
- Example: Basic Swipeable Component
- Key Features of Swipeable Components
- 6. Implementing Drag and Drop
- Example: Basic Drag and Drop Setup
- Drag and Drop Workflow
- 7. Using PanResponder API
- Example: Basic PanResponder Usage
- 8. Handling Touch Feedback
- Example: Touch Feedback Configuration
- 9. Implementing Gesture Recognition
- Example: Basic Tap Gesture
- Example: Using react-native-gesture-handler
- 10. Using Touch Event Coordinates
- Example: Logging Touch Coordinates
Using React Native Gesture Handler
- 1. Installing Gesture Handler
- Example: Basic Setup
- 2. Using Tap Gesture Handler
- Example: Basic Tap Gesture Handler
- Example: Double Tap Gesture Handler
- 3. Using Pan Gesture Handler
- Example: Basic Pan Gesture Handler
- 4. Using Pinch Gesture Handler
- Example: Basic Pinch Gesture Handler
- 5. Using Rotation Gesture Handler
- Example: Rotation Gesture Handler
- 6. Combining Multiple Gestures
- Example: Combining Pan and Tap Gestures
- Example: Exclusive Long Press and Pan
- 7. Handling Gesture State
- Example: Using State in Gesture Handler
- 8. Using Fling Gesture Handler
- Example: Fling Gesture Handler Setup
- 9. Implementing Gesture Callbacks
- Example: Handling Gesture Callbacks
- 10. Integrating with Reanimated
- Example: Pan Gesture with Reanimated
Implementing Animations with Animated API
- 1. Using Animated.Value
- Example: Basic Animation with Animated.Value
- 2. Creating Timing Animations
- Example: Basic timing animation
- 3. Creating Spring Animations
- Example: Basic Spring Animation
- Example: Spring with Custom Stiffness
- 4. Using Animated.decay
- Example: Basic decay animation
- 5. Combining Animations
- Example: Combining Multiple Animations
- 6. Implementing Animated Transforms
- Example: Basic Transform Animation
- Example: Combined Transform Operations
- 7. Using useNativeDriver
- Example: Using useNativeDriver
- 8. Creating Interpolations
- Example: Basic Interpolation
- Example: Advanced Interpolation with Extrapolation
- 9. Handling Animation Loops
- Example: Basic Loop with repeat()
- Example: Loop with Iteration Limit
- 10. Using LayoutAnimation API
- Example: Basic LayoutAnimation
- Key Features
- 11. Implementing Animated Event Bindings
- Example: Basic Animated Event Binding
- 12. Creating Custom Animated Components
- Example: Custom Animated Text Component
Using Reanimated for Advanced Animations
- 1. Installing Reanimated Library
- Example: Basic Installation
- 2. Using useSharedValue Hook
- Example: Basic useSharedValue usage
- 3. Using useAnimatedStyle Hook
- Example: Basic useAnimatedStyle Usage
- Example: Advanced useAnimatedStyle with Multiple Transforms
- 4. Creating Worklets
- Example: Basic Worklet Function
- 5. Implementing withTiming Animation
- Example: Basic withTiming Usage
- Example: withTiming with Easing
- 6. Implementing withSpring Animation
- Example: withSpring Animation
- 7. Using withSequence and withRepeat
- Example: Combining withSequence and withRepeat
- 8. Using useAnimatedGestureHandler
- Example: Basic Gesture Handler
- 9. Creating Animated Scrolling Effects
- Example: Animated Scroll View with Reanimated
- 10. Implementing Layout Animations
- Example: Basic Layout Animation
- 11. Using Interpolate Function
- Example: Interpolating Values
- 12. Optimizing Animation Performance
- Example: Using
- Key Performance Tips
Working with Images and Media
- 1. Loading Local Images
- Example: Loading a Local Image
- 2. Loading Remote Images
- Example: Loading a Remote Image
- 3. Handling Image Caching
- Example: Using cache property
- 4. Using Image Resize Modes
- Example: Image Resize Mode Usage
- 5. Implementing Image Placeholders
- Example: Basic Image Placeholder
- Example: Placeholder with Style
- 6. Handling Image Loading States
- Example: Image Loading State Handling
- 7. Using ImageBackground Component
- Example: Basic ImageBackground Usage
- 8. Optimizing Image Performance
- Example: Using Image Resize Mode
- Example: Preloading Images
- Example: Using Local Images for Better Performance
- Image Performance Tips
- 9. Supporting Multiple Image Densities
- Example: Using Multiple Image Densities
- 10. Implementing Progressive Image Loading
- Example: Using blurRadius for progressive loading
- Example: Enabling progressive rendering
- 11. Using FastImage for Performance
- Example: Basic FastImage Usage
- Key Features
Working with Camera and Media Capture
- 1. Setting Up Camera Permissions
- Example: Requesting Camera Permissions in React Native
- 2. Capturing Photos
- Example: Capture Photo
- 3. Recording Videos
- Example: Start Video Recording
- Example: Stop Video Recording
- 4. Implementing Camera Controls
- Example: Camera Control Configuration
- 5. Accessing Front and Back Camera
- Example: Setting Camera Type
- 6. Handling Camera Orientation
- Example: Setting Camera Orientation
- 7. Implementing QR Code Scanning
- Example: Basic QR Code Scanner Setup
- QR Code Scanning Workflow
- 8. Using Camera Preview Customization
- Example: Basic Camera Preview Setup
- Example: Customizing Camera Preview with Zoom and Flash
- 9. Handling Camera Errors
- Example: Error Handling in Camera Capture
- 10. Using react-native-vision-camera
- Example: Basic Camera Setup
- Key Features
Working with Audio and Video Playback
- 1. Playing Audio Files
- Example: Basic Audio Playback
- Example: Handling Audio Events
- 2. Recording Audio
- Example: Start Recording Audio
- Example: Stop Recording Audio
- 3. Implementing Audio Controls
- Example: Basic Audio Player
- Example: Custom Audio Controls
- 4. Managing Audio Sessions
- Example: Setting Audio Mode
- 5. Implementing Background Audio Playback
- Example: Setting up Background Audio with react-native-audio-toolkit
- Key Steps for Background Audio Playback
- 6. Using react-native-video Component
- Example: Basic Video Player
- Example: Video with Custom Controls
- 7. Implementing Video Controls
- Example: Basic Video Player with Custom Controls
- 8. Handling Fullscreen Video
- Example: Toggle fullscreen mode
- 9. Streaming Live Audio and Video
- Example: Streaming Live Video
- 10. Implementing Audio Focus Handling
- Example: Setting Audio Mode
- Example: Handling Focus Change
Implementing Haptic Feedback and Vibration
- 1. Implementing Vibration
- Example: Basic Vibration
- Example: Vibration Pattern
- Example: Cancel Ongoing Vibration
- 2. Using Haptic Feedback Patterns
- Example: Triggering Haptic Feedback
- 3. Creating Custom Vibration Patterns
- Example: Custom Vibration Pattern
- 4. Handling Platform-specific Haptics
- Example: Using Vibration API for Platform-specific Feedback
- Example: Using react-native-haptic-feedback for iOS
- 5. Using Haptics for User Feedback
- Example: Triggering Haptic Feedback
- 6. Implementing Haptic Touch
- Example: Using Haptic Feedback
- Comparison of Haptic Styles
- 7. Managing Vibration Permissions
- Example: Requesting Vibration Permission on iOS
- 8. Disabling Haptics
- Example: Disabling Haptics in React Native
- 9. Using expo-haptics for Haptic Feedback
- Example: Basic Haptic Feedback
- Example: Notification Haptic Feedback
- 10. Testing Haptic Feedback on Devices
- Example: Basic Vibration Test
- Testing Guidelines
Implementing Navigation
- 1. Setting Up React Navigation
- Example: Installing and Configuring React Navigation
- Example: Basic Stack Navigator Setup
- 2. Creating Stack Navigator
- Example: Basic Stack Navigator Setup
- 3. Creating Tab Navigator
- Example: Basic Tab Navigator Setup
- Example: Customizing Tab Appearance
- 4. Creating Drawer Navigator
- Example: Basic Drawer Navigator Setup
- Example: Custom Drawer Content
- 5. Passing Parameters Between Screens
- Example: Accessing Passed Parameters
- 6. Configuring Screen Options
- Example: Setting Header Title and Tint
- Example: Hiding Header
- 7. Implementing Custom Transitions
- Example: Custom Transition with Animated
- 8. Handling Back Button
- Example: Handling Back Button in Stack Navigator
- 9. Using Navigation Refs
- Example: Setting up Navigation Ref
- Example: Using Navigation Ref to Navigate
- 10. Implementing Nested Navigators
- Example: Stack Navigator inside Tab Navigator
- Best Practices for Nested Navigation
- 11. Using Navigation Lifecycle Events
- 12. Implementing Custom Navigators
- Example: Custom Stack Navigator
Configuring Navigation Options
- 1. Customizing Header Styles
- Example: Customizing Header Styles
- 2. Using Custom Header Components
- Example: Custom Header Component
- Example: Using Custom Header in Stack Navigator
- 3. Hiding and Showing Headers
- Example: Hide Header in Stack Navigator
- Example: Custom Header Component
- 4. Implementing Header Buttons
- Example: Header Right Button
- Example: Header Left Button
- 5. Using Tab Bar Icons and Labels
- Example: Custom Tab Bar Icons and Labels
- 6. Customizing Tab Bar Appearance
- Example: Customizing Tab Bar Appearance
- 7. Implementing Drawer Content
- Example: Basic Drawer Content Component
- 8. Handling Navigation State Persistence
- Example: Using AsyncStorage for Navigation State
- Best Practices for Navigation State Persistence
- 9. Implementing Authentication Flows
- Example: Setting up Auth Flow with Navigation
- Example: Handling Login State
- Example: Protecting Routes with Auth
- 10. Using Navigation TypeScript Types
- Example: Defining Navigation Prop Types
- Example: Using Navigation Prop
Handling Deep Linking and URL Schemes
- 1. Configuring Deep Link Schemes
- Example: Configuring Deep Link Schemes in Android
- Example: Configuring Deep Link Schemes in iOS
- 2. Handling Incoming Links
- Example: Handling Deep Links
- 3. Parsing URL Parameters
- Example: Parsing URL Parameters
- 4. Navigating from Deep Links
- Example: Handling Deep Links in App
- 5. Testing Deep Links
- Testing Deep Links in React Native
- Example: Mock Deep Link Handler
- 6. Implementing Universal Links
- Example: Setting up Universal Links in iOS
- Example: Setting up App Links on Android
- 7. Implementing App Links
- Example: Setting up App Links
- 8. Handling Link Opening
- Example: Opening a URL
- Example: Checking URL Support
- 9. Creating Dynamic Links
- Example: Setting up Firebase Dynamic Links
- Example: Creating a Dynamic Link
- 10. Debugging Deep Link Issues
- Example: Logging Deep Link Events
- Debugging Workflow
Managing App State and Lifecycle
- 1. Using AppState API
- Example: Listening to App State Changes
- 2. Handling App Background Events
- Example: Listening to App State Changes
- 3. Implementing Component Lifecycle
- Example: Component Lifecycle Methods
- 4. Using useEffect for Side Effects
- Example: Fetching Data
- Example: Setting Up and Cleaning Up Subscriptions
- Key Points
- 5. Managing Component State
- Example: useState basic usage
- Example: useReducer for complex state
- 6. Implementing State Persistence
- Example: Using AsyncStorage for Local Storage
- Example: Using Redux Persist with React Native
- Comparison: AsyncStorage vs Redux Persist
- 7. Handling App Resume
- Example: Listening to App State Changes
- Key Points
- 8. Using useReducer for Complex State
- Example: Basic useReducer Setup
- 9. Implementing Global State Patterns
- Example: Using Redux Toolkit for Global State
- State Management Summary
- 10. Managing Async State Updates
- Example: Async State Update with useEffect
Handling Networking and APIs
- 1. Using Fetch API
- Example: Fetch GET request
- Example: Fetch POST request
- 2. Handling Request Headers
- Example: Setting Custom Headers in Fetch
- Example: Sending Headers with POST Request
- 3. Managing API Responses
- Example: Handling API Response
- Key Points
- 4. Implementing Error Handling
- Example: Basic Network Error Handling
- Example: Retry Logic with Exponential Backoff
- Error Handling Best Practices
- 5. Using Abort Controller
- Example: Canceling a Fetch Request
- 6. Handling Network Errors
- Example: Error Boundary in React Native
- 7. Implementing Request Timeouts
- Example: Setting Timeout with Fetch
- 8. Using FormData
- Example: Sending FormData with fetch
- 9. Implementing Retry Logic
- Example: Basic Retry with Exponential Backoff
- 10. Handling Offline Scenarios
- Example: Detecting Network Status
- Example: Using NetInfo with useEffect
- Best Practices for Offline Handling
- 11. Using WebSocket Connections
- Example: Basic WebSocket Connection
- Example: Sending and Receiving Messages
- 12. Using Axios Library
- Example: Basic GET Request
- Example: POST Request with Data
Implementing Data Fetching Patterns
- 1. Using React Query
- Example: Fetching User Data
- Example: Mutating Data
- Key Features
- 2. Implementing Query Caching
- Example: Using React Query for Caching
- Comparison: Caching Strategies
- 3. Using Mutations
- Example: Creating a User with Mutation
- 4. Handling Loading and Error States
- Example: Basic Loading and Error State Handling
- Loading vs Error States Comparison
- Recommended Loading State Workflow
- 5. Implementing Optimistic Updates
- Example: Basic Optimistic Update in React Native
- Key Considerations
- 6. Using SWR for Data Fetching
- Example: Basic SWR Usage
- Key Features
- 7. Implementing Infinite Queries
- Example: Basic Infinite Scroll with React Query
- Key Points
- 8. Using Query Invalidation
- Example: Invalidating a Query After Mutation
- 9. Handling Background Refetching
- Example: Configure background refetching
- 10. Implementing Prefetching
- Example: Prefetching with React Query
- Example: Manual Prefetching with Query Client
Implementing Offline-First Architecture
- 1. Understanding Offline-First Principles
- Example: Detecting Network Status
- 2. Implementing Local Data Caching
- Example: Using AsyncStorage for Local Caching
- Example: Caching with Expiry
- Best Practices for Local Caching
- 3. Using NetInfo for Connectivity Detection
- Example: Check Network Status
- Example: Using react-native-netinfo
- 4. Implementing Request Queuing
- Example: Basic Request Queue Implementation
- 5. Handling Sync Conflicts
- Example: Conflict Detection and Resolution
- Conflict Resolution Approaches
- 6. Using Background Sync
- Example: Scheduling Background Sync
- Key Considerations
- 7. Implementing Optimistic Updates
- Example: Optimistic Update in a Todo List
- Best Practices for Optimistic Updates
- 8. Creating Offline Fallback UI
- Example: Basic Offline UI Component
- Key Points
- 9. Managing Data Reconciliation
- Example: Basic Offline Data Sync Strategy
- Key Points for Data Reconciliation
- 10. Testing Offline Scenarios
- Example: Mocking Network Requests
- Testing Offline Scenarios
Implementing Data Persistence
- 1. Using AsyncStorage API
- Example: Basic AsyncStorage Usage
- 2. Storing Complex Data
- Example: Saving a User Profile Object
- Example: Loading and Parsing User Preferences
- Best Practices for Complex Data Storage
- 3. Implementing Data Encryption
- Example: Encrypting Data with AES-256-GCM
- Example: Decrypting Data
- Best Practices for Data Encryption
- 4. Using MMKV for Performance
- Example: Basic MMKV Setup
- MMKV Performance Benefits
- 5. Handling Storage Limits
- Example: Check Storage Usage
- 6. Implementing Cache Management
- Example: Using AsyncStorage for Caching
- Example: Cache with Expiration
- Cache Management Best Practices
- 7. Using Secure Storage
- Example: Storing and Retrieving Secure Data
- 8. Migrating Storage Data
- Example: Migrating from AsyncStorage to SQLite
- Migration Strategy
- 9. Clearing Storage
- Example: Clearing AsyncStorage
- 10. Implementing Storage Listeners
- Example: Setting up a storage listener with Firebase
Working with SQLite and Databases
- 1. Setting Up SQLite
- Example: Installing SQLite Dependency
- 2. Creating Database Tables
- Example: Creating a Users Table
- 3. Executing SQL Queries
- Example: Basic SELECT Query
- Example: INSERT Query
- Example: UPDATE Query
- Example: DELETE Query
- 4. Implementing CRUD Operations
- Example: Setting up SQLite Database
- Example: Create Operation
- Example: Read Operation
- Example: Update Operation
- Example: Delete Operation
- 5. Using Transactions
- Example: Using Transactions
- 6. Handling Database Migrations
- Example: Using SQLite with React Native and migrations
- Best Practices for Migrations
- 7. Using WatermelonDB for Performance
- Example: Setting up WatermelonDB
- Key Benefits of WatermelonDB
- Setup Workflow
- 8. Implementing Offline-First Patterns
- Example: Setting up SQLite for Offline-First Data
- Offline-First Sync Workflow
- Offline-First vs Online-First
- 9. Syncing Local and Remote Data
- Example: Basic Sync Setup with SQLite and REST API
- Sync Process Workflow
- Sync Strategies Comparison
- Sync Best Practices
- 10. Using Realm Database
- Example: Initializing Realm Database
- Example: Creating a User Object
- Example: Querying Data
- Example: Updating Data
- Example: Deleting Data
Working with Device APIs
- 1. Using Geolocation API
- Example: Get Current Location
- Example: Watch Location Changes
- 2. Accessing Camera Roll
- Example: Fetching Photos
- Example: Saving to Camera Roll
- 3. Using Clipboard API
- Example: Reading from Clipboard
- Example: Writing to Clipboard
- 4. Accessing Device Contacts
- Example: Fetching Contacts
- Example: Contact Fields
- 5. Using Share API
- Example: Sharing Text Content
- Example: Sharing a File
- 6. Accessing Device Information
- Example: Fetching Device Information
- 7. Implementing Biometric Authentication
- Example: Basic Biometric Authentication Setup
- 8. Using App Settings
- Example: Requesting Camera Permission
- Example: Checking Notification Settings
- 9. Checking Network Connectivity
- Example: Basic Network Status Check
- Example: Using @react-native-community/netinfo
- 10. Using Battery Status API
- Example: Battery Status API Usage
Working with Bluetooth and NFC
- 1. Setting Up Bluetooth Permissions
- Example: Requesting Bluetooth Permissions
- Permission Requirements Summary
- 2. Scanning for Bluetooth Devices
- Example: Scan for nearby Bluetooth devices
- 3. Connecting to Bluetooth Devices
- Example: Check Bluetooth State
- Example: Enable Bluetooth
- Example: Scan and Connect to Device
- 4. Reading Bluetooth Characteristics
- Example: Reading a Bluetooth Characteristic
- 5. Writing to Bluetooth Devices
- Example: Writing to a Bluetooth Characteristic
- 6. Implementing BLE Communication
- Example: Connecting to a BLE Device
- Example: Reading a BLE Characteristic
- Example: Writing to a BLE Characteristic
- 7. Setting Up NFC Permissions
- Example: Android Manifest Permissions
- 8. Reading NFC Tags
- Example: Reading NFC Tag Data
- 9. Writing to NFC Tags
- Example: Writing to an NFC Tag
- 10. Handling NFC Errors
- Example: Error Handling in NFC Read
Handling Permissions
- 1. Using PermissionsAndroid
- Example: Requesting Camera Permission
- Example: Checking Location Permission
- 2. Requesting iOS Permissions
- Example: Requesting Camera Permission
- 3. Checking Permission Status
- Example: Check Camera Permission
- 4. Requesting Runtime Permissions
- Example: Requesting Camera Permission
- 5. Handling Permission Denials
- Example: Requesting Camera Permission
- Handling Permission Denial Workflow
- Permission Result Types
- 6. Implementing Permission Rationale
- Example: Requesting Camera Permission with Rationale
- 7. Opening App Settings
- Example: Opening App Settings
- 8. Managing Multiple Permissions
- Example: Requesting Multiple Permissions
- Permission Request Results
- Workflow for Handling Multiple Permissions
- 9. Testing Permission Flows
- Example: Requesting Camera Permission
- Permission Request Workflow
- Permission Request Types
- 10. Using react-native-permissions
- Example: Requesting Camera Permission
- Example: Checking Permission Status
- Permission Types
Working with Notifications
- 1. Setting Up Push Notifications
- Example: Configuring Push Notifications in React Native
- 2. Requesting Notification Permissions
- Example: Requesting Notification Permissions
- 3. Handling Notification Events
- Example: Setting up notification event handlers
- 4. Displaying Local Notifications
- Example: Displaying a Local Notification
- 5. Handling Notification Actions
- Example: Handling Notification Actions
- Workflow: Setting Up Notification Actions
- 6. Using Notification Badges
- Example: Setting a Badge Number
- 7. Implementing Silent Notifications
- Example: Silent Notification Configuration
- 8. Handling Deep Links from Notifications
- Example: Handling Deep Links in Notification
- 9. Scheduling Notifications
- Example: Schedule a notification with delay
- Example: Schedule a recurring notification
- 10. Testing Notifications
- Example: Mocking Notification Permissions
- Testing Workflow
- 11. Using Notifee Library
- Example: Requesting Notification Permissions
- Example: Displaying a Local Notification
- Example: Scheduling a Notification
Working with Maps and Location
- 1. Integrating React Native Maps
- Example: Basic Map Integration
- 2. Displaying User Location
- Example: Displaying User Location on a Map
- 3. Adding Map Markers
- Example: Basic Marker with Title
- Example: Custom Marker Icon
- 4. Drawing Polylines and Polygons
- Example: Drawing a Polyline on a Map
- Example: Drawing a Polygon
- 5. Implementing Geofencing
- Example: Setting up a Geofence
- Geofencing Workflow
- 6. Calculating Distance Between Coordinates
- Example: Calculating Distance in Kilometers
- Example: Calculating Distance in Miles
- 7. Geocoding Addresses
- Example: Geocoding an Address
- 8. Reverse Geocoding
- Example: Using Geocoder Library
- 9. Handling Location Updates
- Example: Watching Location Updates
- 10. Implementing Location-based Features
- Example: Requesting Location Permissions
- Example: Getting Current Location
- Example: Watching Position Changes
Working with WebViews
- 1. Using WebView Component
- Example: Basic WebView Usage
- 2. Loading URL Content
- Example: Loading a URL
- Example: Loading HTML Content
- 3. Loading HTML Strings
- Example: Loading Static HTML
- 4. Handling Navigation State Changes
- Example: Handling Navigation State Changes
- 5. Implementing JavaScript Injection
- Example: Injecting JavaScript into WebView
- 6. Communicating Between WebView and Native
- Example: Sending Data from Native to WebView
- Example: Sending Data from WebView to Native
- Example: Using Native Module to Send Data
- 7. Handling WebView Errors
- Example: Basic Error Handling in WebView
- Error Handling Strategies
- 8. Setting Custom Headers
- Example: Setting Custom Headers in WebView
- 9. Implementing Cookie Management
- Example: Setting and Getting Cookies
- 10. Configuring WebView Security
- Example: WebView Security Configuration
Implementing Dark Mode
- 1. Detecting System Color Scheme
- Example: Detecting System Color Scheme
- 2. Creating Theme Context
- Example: Basic Theme Context Setup
- 3. Implementing Theme Provider
- Example: Basic Theme Provider Setup
- Example: Using Theme in Components
- 4. Styling Components for Dark Mode
- Example: Using StyleSheet with Dark Mode
- Example: Conditional Styling Based on Theme
- 5. Using Dynamic Colors
- Example: Applying Dynamic Colors
- 6. Persisting Theme Preferences
- Example: Using AsyncStorage to Save Theme Preference
- Best Practices for Theme Persistence
- 7. Creating Theme Toggle Component
- Example: Basic Theme Toggle Component
- 8. Handling StatusBar in Dark Mode
- Example: Setting StatusBar Style
- 9. Testing Dark Mode Implementation
- Example: Testing with Jest and React Native Testing Library
- Testing Workflow
- Best Practices for Testing
- 10. Using Styled System for Theming
- Example: Defining a Theme with Styled System
- Key Points
Implementing Advanced UI Patterns
- 1. Creating Bottom Sheets
- Example: Basic Bottom Sheet Implementation
- 2. Implementing Skeleton Screens
- Example: Basic Skeleton Screen
- Example: Skeleton with Image
- 3. Creating Carousels and Sliders
- Example: Basic Carousel with ScrollView
- Example: Slider with PanGestureHandler
- 4. Implementing Accordions
- Example: Basic Accordion Component
- 5. Creating Custom Modals
- Example: Basic Custom Modal
- Key Points
- 6. Implementing Sticky Headers
- Example: Sticky Header in SectionList
- 7. Creating Floating Action Buttons
- Example: Basic Floating Action Button
- Example: Custom Styled FAB
- 8. Implementing Collapsible Headers
- Example: Collapsible Header Implementation
- 9. Creating Tab Views
- Example: Basic Tab View with React Navigation
- Example: Custom Tab Bar Icons
- 10. Implementing Parallax Effects
- Example: Basic Parallax Component
Using UI Component Libraries
- 1. Using React Native Paper
- Key Features
- 2. Using React Native Elements
- Example: Button Component
- Example: Input Component
- 3. Using NativeBase Components
- Example: Using NativeBase Button
- Example: Using NativeBase Input
- 4. Implementing Theming
- Example: Basic Theme Setup
- Example: Custom Theme with Nested Values
- Theming Best Practices
- 5. Customizing Component Styles
- Example: Applying Custom Styles
- 6. Using Styled Components
- Example: Basic Styled Component
- Example: Dynamic Styles with Props
- 7. Implementing Design Systems
- Example: Using a Design System Component
- Comparison: Design Systems vs Custom Components
- Workflow: Integrating a Design System
- 8. Creating Reusable Components
- Example: Basic Reusable Component
- Example: Component with Default Props
- Example: Component with Validation
- 9. Using Tamagui for Cross-Platform UI
- Example: Basic Tamagui Component
- Example: Using Theme Tokens
- Key Features
- 10. Choosing UI Library
- Comparison of Popular React Native UI Libraries
- Key Considerations When Choosing a UI Library
Implementing Accessibility
- 1. Using Accessibility Props
- Example: Using accessibilityLabel and accessibilityRole
- Example: Using accessibilityState for a Toggle Button
- 2. Implementing Screen Reader Support
- Example: Using accessibilityLabel and accessibilityHint
- Example: Using accessibilityRole
- Example: Using accessibilityState
- 3. Using Accessibility Roles
- Example: Using accessibilityRole with TouchableOpacity
- Example: Using accessibilityRole with Image
- 4. Setting Accessibility Hints
- Example: Using accessibilityHint
- 5. Handling Accessibility States
- Example: Using accessibilityState
- Example: Toggle accessibilityState
- 6. Implementing Focus Management
- Example: Managing Focus in a List
- 7. Using AccessibilityInfo API
- Example: Checking Screen Reader Status
- Example: Listening to Accessibility Changes
- 8. Testing with Screen Readers
- Example: Basic Accessibility Test Setup
- Testing Workflow
- 9. Implementing Accessible Forms
- Example: Accessible Form Fields
- 10. Using Accessibility Live Regions
- Example: Using accessibilityLiveRegion
- 11. Handling Dynamic Content Announcements
- Example: Using accessibilityLiveRegion
- Example: Announcing Dynamic Updates
Implementing Internationalization
- 1. Setting Up i18n Library
- Example: Install and Configure react-native-i18n
- 2. Creating Translation Files
- Example: Translation File Structure
- 3. Using Translation Functions
- Example: Basic Translation Usage
- Example: Pluralized Translation
- 4. Handling Pluralization
- Example: Pluralizing Items
- Example: Complex Pluralization
- 5. Implementing RTL Support
- Example: Setting RTL direction in a View
- Example: Using writingDirection for RTL
- 6. Formatting Dates and Numbers
- Example: Formatting Dates in React Native
- Example: Formatting Numbers in React Native
- 7. Detecting Device Language
- Example: Detecting Device Language
- 8. Switching Languages Dynamically
- Example: Switching Language at Runtime
- 9. Handling Fallback Languages
- Example: Setting Fallback Language
- 10. Testing Translations
- Example: Translation Test Setup
- Translation Testing Workflow
- Testing Translation Best Practices
Working with Native Modules
- 1. Understanding Native Module Bridge
- Example: Accessing a Native Module
- 2. Importing Native Modules
- Example: Importing a Native Module
- 3. Calling Native Methods
- Example: Calling a Native Method
- 4. Handling Native Events
- Example: Listening to Native Events
- Event Handling Best Practices
- 5. Creating Custom Native Modules
- Example: iOS Native Module
- Example: Android Native Module
- 6. Creating Custom Native Modules (Android Kotlin/Java)
- 1. Setting Up the Native Module
- 2. Example: A Simple Native Module in Kotlin
- Example: Logging Module
- 3. Registering the Module
- Example: ReactPackage Implementation
- 4. Using the Module in JavaScript
- Example: Using the Module
- 5. Handling Asynchronous Operations
- Example: Asynchronous Operation
- 6. Table: Module Registration and Configuration
- 7. Best Practices
- 8. Common Pitfalls
- 7. Using Native UI Components
- Example: Using MapView
- Example: Using Slider
- 8. Implementing Promise-based APIs
- Example: Implementing a Promise-based API
- 9. Handling Native Callbacks
- Example: Using Callbacks in Native Module
- 10. Debugging Native Module Issues
- Example: Setting up React Native Debugger
- Workflow: Debugging Steps
Implementing New Architecture
- 1. Understanding Fabric Renderer
- Example: Enabling Fabric in React Native
- 2. Understanding TurboModules
- Example: Defining a TurboModule in JavaScript
- Example: Defining a TurboModule in Native Code (iOS)
- Example: Defining a TurboModule in Native Code (Android)
- 3. Enabling New Architecture
- Example: Enabling New Architecture on Android
- 4. Migrating to New Architecture
- Migration Steps
- Example: Enabling New Architecture in Android
- 5. Using JSI
- Example: Calling a JavaScript Function from C++
- Example: Creating a JavaScript Object from C++
- 6. Creating TurboModule Specs
- Example: TurboModule Spec Definition
- Example: Native Implementation (iOS)
- Example: Native Implementation (Android)
- 7. Implementing Codegen
- Example: Configuring Codegen
- 8. Handling Concurrent Rendering
- Example: useTransition
- 9. Using Bridgeless Mode
- Example: Enabling Bridgeless Mode
- 10. Understanding Performance Benefits
- Example: Performance Comparison
Working with TypeScript
- 1. Configuring TypeScript
- Example: Initial Setup
- Example: Basic tsconfig.json
- Example: Enabling Strict Mode
- 2. Typing Component Props
- Example: Typing a Component with Props
- Example: Using Children with Type
- 3. Typing Navigation Params
- Example: Typing Navigation Parameters
- Example: Defining Navigation Parameter Types
- 4. Typing Hooks
- Example: Typing useState
- Example: Typing useEffect
- Example: Typing useContext
- Example: Typing useReducer
- 5. Using Generic Components
- Example: Generic Component with Props
- Example: Using Generic Component with Specific Type
- 6. Typing Context Values
- Example: Typing Context Values
- 7. Typing Native Modules
- Example: Typing a Native Module Method
- 8. Using Utility Types
- Example: Using Pick to create a form type
- Example: Using Partial to make a type optional
- 9. Implementing Strict Type Checking
- Example: Enabling Strict Mode in tsconfig.json
- 10. Handling Third-Party Types
- Example: Using @types Package
- Example: Declaring Custom Types
- Type Definition Sources
Optimizing Performance
- 1. Using React.memo
- Example: Basic Usage
- Example: Custom Comparison Function
- 2. Implementing shouldComponentUpdate
- Example: shouldComponentUpdate implementation
- 3. Using FlatList Optimization Props
- Example: Basic FlatList Usage
- Example: Optimized FlatList with windowSize
- 4. Avoiding Inline Functions and Objects
- Example: Avoiding Inline Functions
- Example: Avoiding Inline Objects
- 5. Using useCallback and useMemo
- Example: Using useCallback for event handlers
- Example: Using useMemo for expensive calculations
- 6. Implementing Image Optimization
- Example: Using React Native's Image Component with Resize Mode
- Example: Preloading Images
- Image Optimization Best Practices
- 7. Reducing Bundle Size
- Example: Using React Native's Built-in Code Splitting
- 8. Using Hermes Engine
- Example: Enabling Hermes in React Native
- Benefits of Hermes
- Hermes vs JavaScriptCore
- Enabling Hermes in React Native
- 9. Implementing Code Splitting
- Example: Using React.lazy and Suspense
- 10. Profiling with React DevTools
- Example: Enable Profiling in React DevTools
- Steps to Profile Performance
- Profiling vs. Other Tools
- 11. Optimizing Navigation Performance
- Example: Using lazy loading
- Navigation Performance Comparison
- 12. Reducing Re-renders
- Best Practices
Implementing Performance Monitoring
- 1. Setting Up Performance Monitoring Tools
- Example: Integrating React Native Performance Monitoring
- 2. Tracking App Launch Time
- Example: Tracking App Launch Time
- 3. Monitoring Screen Render Times
- Example: Measuring Render Time
- Example: Using React Native's Built-in Profiling
- 4. Tracking Network Request Performance
- Example: Measuring fetch request duration
- Example: Using axios with timing
- 5. Implementing Custom Performance Metrics
- Example: Custom Performance Metric with React Native Performance API
- 6. Profiling JavaScript Performance
- Example: Using Flipper for JS Profiling
- Key Metrics to Monitor
- 7. Monitoring Memory Usage
- Example: Monitoring Memory Usage
- Example: Logging Memory Metrics
- 8. Tracking Frame Drops
- Example: Measuring Frame Rate
- Frame Drop Detection Methods
- 9. Using Flipper Performance Plugins
- Example: Enabling Performance Plugin in Flipper
- Key Features
- 10. Analyzing Performance Reports
- Example: Parsing Memory Report
Debugging and Development Tools
- 1. Using React Native Debugger
- Example: Setting up React Native Debugger
- Key Features
- 2. Enabling Debug Mode
- Example: Enable Debug Mode in React Native
- 3. Using Chrome DevTools
- Example: Enable Remote Debugging
- Debugging Workflow
- 4. Implementing Console Logging
- 5. Using React DevTools
- Example: Inspecting Components
- Key Features
- 6. Debugging Network Requests
- Example: Using Flipper to Inspect Network Requests
- Example: Enabling Network Inspection in Flipper
- 7. Using Breakpoints
- Example: Setting a Breakpoint in React Native
- 8. Inspecting Element Hierarchy
- Example: Using React Native Debugger
- Comparison: Debugging Tools
- 9. Monitoring Performance
- Example: Using React Native Performance Monitor
- Performance Monitoring Tools Comparison
- Workflow: Setting Up Performance Monitoring
- 10. Using Flipper for Debugging
- Example: Setting up Flipper with React Native
- Setup Steps
- 11. Debugging Native Code
- Example: Using Flipper to Debug Native Code
Handling Errors and Crashes
- 1. Using Error Boundaries
- Example: Basic Error Boundary
- 2. Implementing Global Error Handlers
- Example: Setting up a global error handler
- Example: Logging errors to a service
- 3. Catching Promise Rejections
- Example: Handling Promise Rejection
- 4. Logging Errors to Services
- Example: Sentry Integration
- Example: Bugsnag Integration
- 5. Handling Native Crashes
- Example: Implementing Error Boundaries in React Native
- Example: Using Sentry for Native Crash Reporting
- Native Crash Handling Summary
- 6. Using Try-Catch Blocks
- Example: Basic Try-Catch Usage
- Example: Handling Asynchronous Errors
- 7. Implementing Crash Reporting
- Example: Setting up crash reporting with Sentry
- 8. Debugging Production Errors
- Example: Setting up Sentry for React Native
- Example: Custom Error Boundary in React Native
- Best Practices for Production Error Debugging
- 9. Handling Unhandled Exceptions
- Example: Global Error Handler in React Native
- 10. Creating Error Fallback UI
- Example: Basic Error Boundary Component
Testing React Native Apps
- 1. Writing Unit Tests
- Example: Testing a simple function
- Example: Mocking modules
- 2. Testing Components
- Example: Testing a Simple Component
- Example: Testing Button Press
- Testing Component Workflow
- 3. Mocking Native Modules
- Example: Mocking a Native Module
- 4. Testing Hooks
- Example: Testing useEffect
- Example: Testing useState
- 5. Writing Integration Tests
- Example: Setting up integration test environment
- Best Practices for Integration Tests
- 6. Testing Navigation
- Example: Testing Navigation with React Navigation
- Navigation Testing Best Practices
- 7. Implementing Snapshot Testing
- Example: Basic Snapshot Test
- Best Practices for Snapshot Testing
- 8. Testing Async Code
- Example: Testing Async Fetch
- 9. Using Test Renderers
- Example: Using React Test Renderer
- 10. Implementing E2E Testing
- Example: Setting up Detox for E2E Testing
- Example: Writing a Detox Test
- Key Steps in E2E Testing Setup
- 11. Testing on Real Devices
- Example: Setting up Detox for E2E Tests
- Key Points for Device Testing
- 12. Using Maestro for E2E Testing
- Example: Setting up Maestro for React Native
- Workflow: Running Maestro Tests
- Comparison: Maestro vs Detox
Implementing Security Best Practices
- 1. Storing Sensitive Data Securely
- Example: Secure Storage with react-native-sensitive-info
- Secure Storage Best Practices
- 2. Implementing SSL Pinning
- Example: iOS SSL Pinning Configuration
- Example: Android SSL Pinning Configuration
- 3. Using Code Obfuscation
- Example: Obfuscating React Native Code
- 4. Preventing Reverse Engineering
- Example: Runtime Integrity Check
- 5. Implementing Biometric Authentication
- Example: Using LocalAuthentication
- 6. Using Secure Communication
- Example: Enforcing HTTPS in API calls
- Example: Certificate Pinning Setup (iOS)
- 7. Validating User Input
- Example: Email Validation
- Example: Phone Number Validation
- 8. Implementing App Transport Security
- Example: ATS Configuration in Info.plist
- ATS Best Practices
- 9. Preventing Screenshot Capture
- Example: Using react-native-screenshot-prevention
- 10. Using ProGuard
- Example: Basic ProGuard Configuration
- Example: Enabling ProGuard in Android Build
- Key ProGuard Features for React Native
- 11. Implementing Root/Jailbreak Detection
- Example: Basic Jailbreak Detection
Implementing Analytics and Tracking
- 1. Setting Up Analytics SDK
- Example: Installing and Configuring React Native Analytics
- 2. Tracking Screen Views
- Example: Tracking Screen View with React Native
- 3. Tracking User Events
- Example: Tracking a Purchase Event
- 4. Setting User Properties
- Example: Setting User Properties
- 5. Implementing Custom Events
- Example: Tracking Custom Event
- 6. Tracking E-commerce Events
- Example: Tracking Product Viewed
- Example: Tracking Purchase Completed
- 7. Using Event Parameters
- Example: Tracking an event with parameters
- 8. Implementing Conversion Tracking
- Example: Setting Up Conversion Tracking
- 9. Testing Analytics Implementation
- Example: Testing with React Native Debugger
- Testing Workflow
- 10. Analyzing User Behavior
- Example: Tracking Screen Views
- Example: Tracking Custom Events
- Key Metrics to Track
Implementing Background Tasks
- 1. Running Tasks in Background
- Example: Using AsyncStorage for Background Data Persistence
- 2. Using Background Fetch
- Example: Configure Background Fetch
- 3. Implementing Background Geolocation
- Example: Configure Background Geolocation
- Example: Handle Location Updates
- 4. Scheduling Background Jobs
- Example: Scheduling a Background Job
- 5. Handling Background Notifications
- Example: Handling Background Notification
- Key Points
- 6. Using Headless JS
- Example: Registering a Headless JS Task
- Example: Triggering a Headless JS Task
- 7. Implementing Background Audio
- Example: Setting up Background Audio
- 8. Managing Battery Optimization
- Example: Registering a Background Task
- 9. Testing Background Tasks
- Example: Testing Background Task with Jest
- Testing Considerations
- 10. Handling Background Limitations
- Example: Background Fetch Configuration
- Example: Push Notification Setup
- Platform-Specific Considerations
Implementing In-App Purchases
- 1. Setting Up In-App Purchase Libraries
- Example: Installing react-native-iap
- Example: Linking Native Dependencies (iOS)
- 2. Configuring Products
- Example: Product Configuration
- 3. Fetching Available Products
- Example: Fetching Product Details
- Product Types Overview
- 4. Initiating Purchase Flow
- Example: Initiating Purchase Flow
- 5. Handling Purchase Verification
- Example: Verify Purchase
- 6. Restoring Purchases
- Example: Restore Purchases
- 7. Implementing Subscriptions
- Example: Subscription Product Configuration
- Example: Purchase Subscription
- 8. Handling Subscription Status
- Example: Check Subscription Status
- 9. Testing In-App Purchases
- Example: Setting up Purchase Testing
- Testing Workflow
- Testing vs Production
- 10. Managing Purchase Errors
- Example: Error Handling in Purchase Flow
Using React Native CLI
- 1. Creating New Project
- Example: Create a new React Native project
- 2. Running on iOS
- Example: Running on iOS Simulator
- 3. Running on Android
- Example: Run on Android emulator
- 4. Starting Metro Bundler
- Example: Starting Metro Bundler
- 5. Linking Native Dependencies
- Example: Linking a Native Module
- Example: Manual Linking (Legacy)
- Linking Process Overview
- 6. Building for Release
- Example: Build Release APK for Android
- Release Build Checklist
- 7. Cleaning Build Cache
- Example: Clean Build Cache
- 8. Generating Release APK
- Example: Generate Release APK
- 9. Logging Device Output
- Example: Logging to Device Console
- 10. Upgrading React Native
- Example: Upgrade to latest version
- Example: Upgrade to specific version
- Upgrade Process Steps
Handling App Configuration
- 1. Using Config Files
- Example: app.json configuration
- Example: metro.config.js setup
- 2. Managing API Keys Securely
- Example: Using react-native-config
- 3. Implementing Feature Flags
- Example: Using Feature Flags in React Native
- 4. Using Remote Config
- Example: Fetching and Using Remote Config
- Example: Setting Default Values
- Key Features of Remote Config
- 5. Handling Build Configurations
- Example: Build Configuration in Gradle
- Example: iOS Build Configuration
- 6. Setting Up Multiple Environments
- Example: Environment Configuration with .env Files
- 7. Configuring Build Settings
- Example: build.gradle (app level)
- 8. Using Native Configuration
- Example: Accessing native configuration in React Native
- Example: Reading from AndroidManifest.xml
- Example: Reading from Info.plist (iOS)
- 9. Managing App Constants
- Example: Using Constants in Code
- 10. Implementing Dynamic Configuration
- Example: Using Environment Variables
- Example: Fetching Remote Config
Building and Configuring Apps
- 1. Configuring package.json
- Example: package.json configuration
- 2. Setting App Name and Bundle ID
- Example: Configuring app name and bundle ID in app.json
- 3. Configuring App Icons
- Example: iOS App Icon Setup
- Example: Android App Icon Setup
- 4. Setting Up Splash Screens
- Example: Basic splash screen setup with react-native-splash-screen
- Setup Steps
- 5. Configuring Build Variants
- Example: Setting Build Type in Gradle
- Example: Setting Build Type in Xcode
- 6. Using Environment-specific Configurations
- Example: Environment Configuration Setup
- Example: Using Config in App
- 7. Managing App Versioning
- Example: Configuring version in package.json
- Example: Setting version in app.json (Expo)
- 8. Configuring Permissions
- Example: Requesting Camera Permission
- 9. Setting Up Deep Link Schemes
- Example: Configuring Deep Link in AndroidManifest.xml
- Example: Handling Deep Links in iOS (Info.plist)
- 10. Configuring App Signing
- Example: Android signing configuration in gradle.properties
- Example: Android signing config in build.gradle
Optimizing App Bundle Size
- 1. Analyzing Bundle Size
- Example: Using webpack-bundle-analyzer
- 2. Enabling Hermes Engine
- Example: Enabling Hermes in React Native
- 3. Using ProGuard/R8
- Example: Enabling ProGuard/R8 in build.gradle
- 4. Implementing Code Splitting
- Example: Using React.lazy for Dynamic Imports
- Example: Splitting by Route
- Benefits of Code Splitting
- 5. Removing Unused Dependencies
- Example: Removing lodash
- Example: Replacing moment.js with dayjs
- 6. Optimizing Images
- Example: Using Image with Resize Mode
- Example: Optimizing Image Size
- 7. Using App Bundles
- Example: Configuring App Bundle for Android
- 8. Enabling Bitcode
- Example: Enabling Bitcode in Xcode
- 9. Stripping Debug Symbols
- Example: Enabling Debug Symbol Stripping in React Native
- 10. Implementing Dynamic Imports
- Example: Using Dynamic Imports for Components
Implementing CI/CD Pipelines
- 1. Setting Up GitHub Actions
- Example: Basic GitHub Actions Workflow
- 2. Configuring Fastlane
- Example: Fastlane Configuration
- Fastlane Setup Steps
- 3. Using EAS Build
- Example: Setting up EAS Build
- Key Features of EAS Build
- 4. Implementing Automated Testing
- Example: Setting up Jest for React Native
- Workflow: Setting up Jest for React Native
- Comparison: Jest vs Detox for Testing
- 5. Building iOS Apps in CI
- Example: Fastlane Configuration
- 6. Building Android Apps in CI
- Example: CI Pipeline Configuration
- 7. Managing Signing Credentials
- Example: Storing Keystore in GitHub Secrets
- Example: Using Keystore in Gradle
- Example: Storing iOS Certificates in CircleCI
- 8. Implementing Code Signing
- Example: Code Signing Configuration in Gradle
- Example: iOS Code Signing in Xcode
- 9. Automating App Store Deployment
- Example: Fastlane Configuration for iOS
- Example: Gradle Configuration for Android
- 10. Using Bitrise for Mobile CI
- Example: Bitrise Workflow Configuration
- Bitrise CI Pipeline Overview
Implementing OTA Updates
- 1. Setting Up CodePush
- Example: Initializing CodePush
- 2. Implementing Silent Updates
- Example: Silent Update Configuration
- 3. Handling Mandatory Updates
- Example: Mandatory Update Configuration
- 4. Using Expo Updates
- Example: Configuring Expo Updates
- Example: Checking for Updates
- Update Flow
- 5. Managing Update Rollbacks
- Example: Configuring Rollback Behavior
- Rollback Process Overview
- Manual Rollback Workflow
- 6. Testing OTA Updates
- Example: Testing OTA Update Flow
- Testing OTA Update Workflow
- 7. Implementing Update UI
- Example: Basic Update UI Component
- 8. Configuring Update Policies
- Example: Configuring Update Policies in Code
- 9. Monitoring Update Success Rates
- Example: Basic Success Rate Tracking
- Key Metrics to Track
- 10. Handling Update Errors
- Example: Error Handling with Expo Updates
Upgrading and Migrating
- 1. Checking Current Version
- Example: Check React Native Version in Package.json
- 2. Using React Native Upgrade Helper
- Example: Using the React Native Upgrade Helper CLI
- 3. Upgrading React Native
- Example: Upgrade React Native version
- Upgrade Steps
- 4. Handling Breaking Changes
- Common Breaking Changes in React Native
- Example: Migrating Navigation
- 5. Updating Dependencies
- Example: Updating React Native and Core Dependencies
- Update Process Summary
- 6. Migrating to New Architecture
- Example: Enabling New Architecture in Android
- Example: Enabling New Architecture in iOS
- Migration Checklist
- 7. Testing After Upgrade
- Example: Running Tests After Upgrade
- Testing Best Practices After Upgrade
- 8. Rolling Back Upgrades
- Steps to Rollback a React Native Upgrade
- 9. Handling iOS Podfile Changes
- Example: Updating Podfile Platform
- Example: Updating React Native Version in Podfile
- Workflow: Resolving Podfile Conflicts
- Common Issues in iOS Podfile Updates
- 10. Updating Android Gradle
- Example: Updating Gradle Plugin in build.gradle
- Example: Updating Gradle Wrapper in gradle-wrapper.properties
- Steps to Update Android Gradle Plugin
Deploying to App Stores
- 1. Preparing for iOS Release
- Example: Xcode Signing Configuration
- 2. Creating App Store Connect Listing
- Example: App Store Connect Setup
- App Store Connect Setup Checklist
- 3. Generating iOS Certificates and Profiles
- Example: Code Signing Configuration
- 4. Building iOS Archive
- Example: Xcode Archive Settings
- 5. Uploading to App Store
- Example: Upload to Apple App Store
- 6. Preparing for Android Release
- Example: AndroidManifest.xml Configuration
- 7. Generating Signed APK/AAB
- Example: Keystore Configuration
- 8. Creating Google Play Console Listing
- Example: Basic Play Store Listing Configuration
- Key Steps to Create Play Store Listing
- 9. Uploading to Google Play
- Upload Process
- Example: Building Release APK
- Example: App Store Listing Metadata
- Key Points to Remember
- 10. Managing App Versioning for Updates
- Example: Configuring version in package.json
- Example: iOS version settings in Info.plist
- Example: Android version settings in build.gradle
- 11. Handling App Review Process
- Example: App Store Metadata Setup
- App Review Workflow
- App Store vs Play Store Review
- Key Considerations
Handling App Store Guidelines
- 1. Understanding iOS App Store Guidelines
- Example: Privacy Policy Requirement
- 2. Understanding Google Play Policies
- Example: In-App Purchase Implementation
- 3. Handling App Rejections
- Example: Common Rejection Reason - Inappropriate Content
- Common App Store Rejection Reasons
- Steps to Address Rejection
- 4. Implementing Required Disclosures
- Example: Privacy Policy Disclosure
- Example: Data Collection Disclosure
- Comparison: Data Collection Types
- 5. Managing User Privacy Compliance
- Example: Requesting Permissions
- Comparison: iOS vs Android Permission Models
- Key Privacy Compliance Steps
- 6. Handling GDPR Requirements
- Example: GDPR Compliance in React Native App
- GDPR Compliance Checklist
- 7. Implementing App Tracking Transparency
- Example: Requesting Tracking Authorization
- Authorization Statuses
- 8. Managing Content Ratings
- Example: Content Rating Configuration
- 9. Handling Export Compliance
- Example: Export Compliance Check
- 10. Appealing App Rejections
- Example: Submitting an Appeal
- Appeal Process Overview