React Native Tutorial
Learn React Native step by step: 71 lessons in 12 chapters with examples, quizzes, diagrams and projects.
Start learning →
of lessons completed
Getting Started
- What is React Native? Learn what React Native is, how it turns React components into real native views, how it differs from web React, Flutter and native code, and when to pick Expo.
- Setting Up with Expo Create a React Native app with create-expo-app, run it in Expo Go, a simulator or a real phone, understand development builds and tour the project folder.
- Project Structure and App Config Understand the files in an Expo project: app.json and app.config.ts, package.json, the Expo Router app folder, assets, EXPO_PUBLIC environment variables and tsconfig.
- Core Components: View, Text, Image Learn View, Text, Image and ScrollView, how they map to native widgets, why div and span do not exist, and the rules for nesting text in React Native.
- Building Your First Screen Compose View, Text and Image into a profile screen, pass props, style with StyleSheet.create, handle safe areas and the status bar, and use Fast Refresh.
- How React Native Runs Your Code See how React Native runs your JavaScript: Hermes, the JS and UI threads, JSI, Fabric's render, commit and mount phases, TurboModules and bridgeless mode.
Styling and Layout
- Styling with StyleSheet Learn how styling works in React Native: style objects, StyleSheet.create, style arrays, the missing cascade, density-independent units and platform differences.
- Flexbox in React Native Master Flexbox in React Native: the column default, flexDirection, justifyContent, alignItems, gap, flex, flexGrow and flexBasis, with a live playground.
- Sizing, Margins and Absolute Positioning Control size and spacing in React Native: width, height, percentages, aspectRatio, padding, margin, position absolute, zIndex and overflow, with live layout boxes.
- Responsive Layouts and Screen Sizes Build React Native layouts that adapt to phones, tablets and foldables with useWindowDimensions, breakpoints, orientation, safe-area insets and PixelRatio.
- Platform-Specific Code Write code that adapts to iOS and Android in React Native: Platform.OS, Platform.select, .ios and .android files, shadows versus elevation, fonts and native feel.
- Theming and Dark Mode Add dark mode and theming to a React Native app with useColorScheme, the Appearance API, a theme context, design tokens and custom fonts loaded with expo-font.
- Styling Libraries and Design Systems Compare NativeWind, Tamagui, Unistyles and component libraries for React Native, learn what each solves, and build a tiny style helper to see how they work.
Components and Interaction
- Text and TextInput Master the Text and TextInput components in React Native: truncation, nesting, fonts, keyboard types, secure entry, and controlled inputs, with live stand-ins.
- View Props and the Touch Responder System Learn the useful props of React Native's View: pointerEvents, onLayout, collapsable, accessibility and focus props, and how the touch responder system picks a winner.
- Pressable, Buttons and Touch Feedback Learn Pressable, Button and touch feedback in React Native: pressed states, long press, hitSlop, Android ripple and minimum touch targets, with live stand-ins.
- Images, Icons and Media Show local and remote images in React Native, choose resizeMode or contentFit, cache with expo-image, draw SVG, use vector icons and blurhash placeholders.
- ScrollView and Keyboard Handling Learn ScrollView, RefreshControl, KeyboardAvoidingView, Keyboard.dismiss and keyboardShouldPersistTaps so forms stay visible and usable when the keyboard opens.
- ScrollView in Depth: Bounce, Zoom, Snapping and Scroll Events Go beyond the basics of ScrollView: bounce and deceleration, zooming, snapToInterval and pagination, momentum and drag events, indicators, and when not to use it.
- TextInput in Depth: Props, Events and Real-Time Input A complete tour of React Native TextInput: autofill and keyboard props, selection, caret and return key options, the event order, and real-time input handling with masks.
- Modals, Alerts and Bottom Sheets Show Modal, Alert.alert, action sheets, bottom sheets and toasts in React Native, handle the Android back button, and model a modal stack with live stand-ins.
- Button, TouchableHighlight, ActivityIndicator, Switch and ImageBackground Use React Native's small built-in components well: Button props, TouchableHighlight timing, ActivityIndicator, Switch colors and ImageBackground with overlays.
- Platform APIs: Linking, Share, Vibration, Appearance Use React Native's built-in platform APIs: open links with Linking, share content, vibrate, track AppState, handle the Android back button and ask for permissions.
- Smart and Presentational Components, Importing and Exporting Split React Native screens into smart (container) and dumb (presentational) components, and learn default and named exports, index files and how Metro resolves imports.
- Accessibility in React Native Make React Native apps usable with VoiceOver and TalkBack: accessibilityLabel, role, state, focus order, dynamic type, touch targets and color contrast.
- UI Recipes: Radio Buttons, Tables, Search Bars, FABs, Avatars, Menus and Calendars Build common React Native UI pieces: radio groups, data tables, search bars, floating action buttons, avatars, progress bars, menus, image preview, GIFs and calendars.
Lists
- FlatList Essentials Learn FlatList in React Native: data and renderItem, keyExtractor, separators, header, footer, empty state, numColumns and extraData, with live stand-ins.
- Fast Lists: Virtualization and Tuning Make React Native lists smooth: how virtualization works, windowSize, getItemLayout, memoized rows, stable callbacks, removeClippedSubviews and FlashList.
- SectionList, Pull to Refresh and Infinite Scroll Group rows with SectionList and sticky headers, add pull to refresh with RefreshControl, and load more pages with onEndReached without duplicate requests.
Navigation
- Navigation Concepts for Mobile Understand mobile navigation before you pick a library: the screen stack, tabs and drawers, deep links, React Navigation versus Expo Router, with live stand-ins.
- Stack Navigation with React Navigation Set up a native stack with React Navigation: screens, navigate, push, goBack, replace, popToTop and header options, plus a runnable stack navigator stand-in.
- Route Params and Typed Navigation Pass data between screens with route.params, type every route with a param list, update params with setParams, return results and use the navigation hooks.
- Tab and Drawer Navigators Build bottom tabs, badges, a drawer and top tabs with React Navigation, nest stacks inside tabs, and try a runnable tab navigator stand-in.
- File-Based Routing with Expo Router Learn Expo Router: the app directory, layouts, dynamic routes, route groups, Link and router APIs and typed routes, with a runnable path matcher stand-in.
- Deep Linking and Authentication Flows Open screens from URLs with schemes and universal links, configure linking, protect routes behind login, hold the splash screen and redirect after sign-in.
State and Data
- State in React Native Apps Choose where state lives in a React Native app: useState, useReducer, lifting state, context and stores, with mobile-specific traps and runnable stand-ins.
- Global State with Zustand and Redux Toolkit Share state across React Native screens with Zustand or Redux Toolkit, use selectors to avoid extra re-renders, and persist stores. Includes live mini-store demos.
- Networking with fetch Load JSON in React Native with fetch: loading and error states, response.ok, AbortController timeouts, localhost addresses on emulators and HTTPS rules.
- Server State with TanStack Query Fetch, cache and update server data in React Native with TanStack Query: stale time, focus and online managers, optimistic updates and offline mutations.
- Storing Data: AsyncStorage, MMKV and SecureStore Keep data on the device in React Native: AsyncStorage, MMKV and SecureStore compared, JSON serialization, what is safe to store, and schema migrations.
- Local Databases with SQLite Store structured data on the device with expo-sqlite: queries, transactions, schema migrations, Drizzle and WatermelonDB overview, and offline-first sync ideas.
- Forms and Validation Build React Native forms with controlled inputs, React Hook Form and Zod validation, keyboard flow with refs and returnKeyType, and clear error messages.
Native Features
- Camera, Location and Sensors Use the camera, GPS, image picker and motion sensors in React Native with Expo, and handle every permission state: undetermined, granted, denied and blocked.
- Push Notifications Learn local and remote notifications in React Native: permissions, Expo push tokens, foreground handlers, Android channels, taps and what happens in the background.
- Internationalization: Multi-Language Apps with i18next Add multiple languages to a React Native app: i18next and react-i18next setup, translation files, fallback language, plurals, interpolation, locale detection and right-to-left layout.
- Native Modules, Expo Modules and Config Plugins Know when JavaScript is not enough in React Native: Turbo Modules, the Expo Modules API, config plugins, prebuild and custom development clients explained.
Animation and Gestures
- Animations with the Animated API Animate React Native views with the built-in Animated API: Animated.Value, timing and spring, interpolate, the native driver and LayoutAnimation, with runnable math demos.
- Reanimated and Gesture Handler Build fluid UI-thread animations in React Native with Reanimated shared values and worklets, and combine gestures with Gesture Handler, including swipe-to-dismiss.
Quality
- Testing React Native Apps Test React Native apps with Jest and React Native Testing Library, mock native modules, and learn when end-to-end tools like Maestro and Detox are worth it.
- Debugging and Performance Profiling Debug React Native apps with the dev menu, React DevTools, LogBox and the Hermes profiler, then hunt slow startup, big bundles and needless re-renders.
- Mobile App Security Protect a React Native app: keep secrets out of the bundle, store tokens safely, understand certificate pinning, root detection, obfuscation and OWASP MASVS.
- Common Pitfalls and Fixes The React Native mistakes almost every team makes, with fixes: text outside Text, covered inputs, Android back, image sizes, background timers and stale closures.
Shipping
- Builds with EAS and App Store Submission Build and ship a React Native app with EAS: eas.json profiles, signing credentials, TestFlight and Play Console tracks, version numbers and submission.
- Over-the-Air Updates and Release Strategy Ship JavaScript fixes without store review using EAS Update: runtime versions, channels, rollbacks, staged rollouts and what the store rules allow.
- Crash Reporting and Analytics Find out what breaks in production: Sentry crash reporting, source maps, analytics events, feature flags, and privacy and consent rules for mobile apps.
Projects
- Project: Todo App Build a React Native todo app: a reducer for the logic, FlatList for the view, a TextInput to add items and AsyncStorage to persist them, with runnable stand-ins.
- Project: Weather App Build a React Native weather app with fetch, a four-state request model, a search input, pull to refresh and stale-response protection, with a mocked API stand-in.
- Project: Notes App with Navigation Build a notes app in React Native with a stack navigator, an editor form, a storage adapter and live search, plus runnable stand-ins for navigation and notes.
- Project: Shopping App Build a React Native shopping app: product list, cart reducer and context, bottom tabs with a badge and a validated checkout form, with a runnable cart stand-in.
- Project: Chat App UI Build a chat screen in React Native: an inverted FlatList, keyboard handling, optimistic sending with message status and retry, using a runnable fake socket.
- Project: Habit and Fitness Tracker Build a habit and fitness tracker in React Native: a SQLite schema, streak logic, SVG bar charts, daily reminders and animated progress, with runnable stand-ins.
- Project: Calculator and Stopwatch Build two classic React Native apps: a calculator with a pure reducer and a stopwatch with start, stop, reset and laps, with logic tested as plain functions.
- Project: Number Guessing Game, OTP Generator and Random Numbers Build a random number generator, a number guessing game and a one-time-password generator and validator in React Native, with testable logic, expiry and attempt limits.
- Project: Currency Converter and GPA Calculator Build a currency converter with swap and cross rates, and a GPA calculator with a course list, weighted grades and a picker, using tested pure functions.
- Project: Jokes Generator and Dictionary App Build two API-driven React Native apps, a jokes generator and a dictionary with audio, and learn loading, error and empty states, stale-request guards and safe parsing.
- Project: Password Manager and Password Validator Build a password strength validator, a secure password generator and a small password manager in React Native, with SecureStore, masking, biometrics and clipboard rules.
- Project: Blog App and Text Editor Build a React Native blog app with create, read, update and delete, then a text editor with a formatting toolbar that works on the selected text, using testable pure functions.
Practice and Review
- Exercises: Components, Styles and Lists Eight graded React Native exercises on Flexbox layout, Pressable feedback, FlatList search, keys and immutable updates, each with a hint, a solution and a live stand-in.
- Exercises: Navigation, Data and Performance Nine React Native exercises on navigation stacks, typed params, auth flows, storage migrations, query caching, optimistic updates and list tuning, with solutions.
- React Native Interview Questions Prepare for React Native interviews: architecture, Hermes, Fabric, lists, navigation, state, performance and platform differences, with short answers and live stand-ins.
- React Native Cheat Sheet A compact React Native cheat sheet: core components, style props, Flexbox values, FlatList props, navigation calls, hooks, storage and the Expo and EAS commands.