Mobile
Build iOS and Android apps with React: Expo, core components, navigation, storage, testing and release.
A path for React developers moving to mobile. It covers setting up with Expo, the core components and styling model, networking, gestures and navigation, secure storage, testing, performance tuning, native modules and shipping to both app stores. Each subject links the official documentation.
The subjects follow the roadmap.sh React Native roadmap.
React Native lets you write an app in React and TypeScript/JavaScript and render real platform views on iOS and Android. Your components run on a JavaScript engine (Hermes by default) and talk to native code through the New Architecture (Fabric renderer, TurboModules, JSI).
A framework from Meta that maps React components such as <View> and <Text> to native UI widgets instead of the DOM, so the result looks and scrolls like a native app rather than a web view.
One codebase and one team for two platforms, fast iteration with Fast Refresh, the npm ecosystem, and the option to drop into Swift or Kotlin when a feature needs it. Web React skills transfer almost directly.
Flutter (Dart, draws its own widgets), Kotlin Multiplatform (shared logic, optional shared Compose UI), fully native Swift/Kotlin apps, and web-view shells like Ionic/Capacitor. Each trades code sharing against native fidelity differently.
React Native assumes you are comfortable with modern JavaScript and the core ideas of React. Styling borrows CSS property names and Flexbox, so some CSS background makes layout far less confusing.
Variables, functions, closures, arrays and objects, destructuring, modules, promises and async/await. Most bugs in RN apps are plain JavaScript bugs, so this pays off first.
Box model, margins and padding, colours, fonts and Flexbox. RN uses camelCased CSS-like properties on style objects, without cascading or selectors.
The React model is identical on mobile: UI is a function of props and state, built from composable components. Learn it from the React docs, then swap HTML tags for React Native core components.
Functions that return JSX. Keep them small and pure, compose them, and extract reusable pieces once the same markup appears in two places.
Data a component remembers between renders, held with useState or useReducer. Setting state schedules a re-render; never mutate it in place, and lift it up when siblings need it.
The HTML-like syntax compiled to function calls. In RN every visible string must sit inside <Text>, and attributes are props, not DOM attributes.
Read-only inputs a parent passes to a child, including callbacks and children. Typing them with TypeScript catches most integration mistakes at compile time.
The React Native team recommends starting new apps with a framework, and Expo is the main one. You still need Xcode for iOS builds (macOS only) and Android Studio with an SDK and emulator for Android.
A framework and toolchain around RN: file-based routing with Expo Router, a large SDK of native modules, development builds, config plugins instead of hand-edited native projects, and EAS cloud build and submit.
npx create-expo-app@latest scaffolds a TypeScript project with Expo Router. Pick a different starter with --template.
A browser playground that runs RN code on a web preview or on your phone through Expo Go. Handy for sharing reproductions and trying a library without a local setup.
Expo Go only includes the SDK's modules, so real apps use development builds once they need custom native code. EAS services are paid beyond a free tier, and you follow Expo's SDK release cadence for RN upgrades.
The community CLI (npx @react-native-community/cli init) gives a bare project with ios/ and android/ folders you own and maintain yourself. Choose it for brownfield or heavily customised native setups.
The JavaScript bundler and dev server behind every RN app. It resolves modules, transforms with Babel and serves bundles for Fast Refresh; customise it in metro.config.js for monorepos, SVGs or extra asset types.
Day to day you run Metro, an app on a simulator or device, and edit with Fast Refresh. Native changes (new modules, config plugins, Info.plist edits) need a rebuild; JavaScript changes do not.
Test on real hardware early: performance, camera, push and gestures behave differently from simulators. Android needs USB debugging enabled; iOS needs a signing team in Xcode or an EAS development build.
RN ships its own debugging stack: a Dev Menu, on-screen LogBox errors, and React Native DevTools built on Chrome DevTools for Hermes apps. Learn it before reaching for console.log everywhere.
Opened by shaking the device, Cmd+D in the iOS Simulator, Cmd+M/Ctrl+M on the Android emulator, or m in the Metro terminal. It reloads, opens DevTools and toggles the performance monitor.
On by default: edits re-render components while keeping their state. A file that exports anything other than components forces a full reload, and a syntax error recovers once fixed.
The in-app overlay for warnings and red-box errors with symbolicated stacks. Silence known noise with LogBox.ignoreLogs([...]) rather than disabling it entirely.
Maps minified bundle positions back to your source files. Upload them with each release to Sentry or a similar service, or crash reports from production will be unreadable.
React Native DevTools gives a console, source breakpoints, memory profiling and the React Components and Profiler panels. Press j in Metro to open it; it replaces the old Flipper and remote Chrome debugging.
The built-in building blocks that map to native views: containers, text, images, inputs and feedback widgets. Know their props well before installing a UI library on top.
The only component that can render strings. Nested <Text> inherits style; numberOfLines truncates and selectable allows copying.
Controlled with value and onChangeText. Set keyboardType, autoComplete, secureTextEntry and returnKeyType so the right keyboard and autofill appear.
A minimal native-styled button with title and onPress. It barely accepts styling, so most apps build their own on top of Pressable.
Shows bundled assets via require() or remote URLs via { uri }. Remote images need explicit width and height; resizeMode controls fitting. expo-image adds better caching.
An Image that lays out children on top of it, for hero banners and cards. Style the image itself through imageStyle.
The basic container, mapping to UIView and android.view.View. It handles Flexbox layout, styling, touch responders and accessibility props.
Pads content away from notches, the home indicator and status bar. The core version is iOS-only and deprecated, so use react-native-safe-area-context instead.
Moves content out from under the on-screen keyboard using behavior="padding" or "height". Results differ per platform, so test forms on both.
The native spinner, sized with size and coloured with color. Use it for short indeterminate waits; skeletons feel better for content loading.
Presents content above the app with visible, animationType and onRequestClose, which handles the Android back button. Navigation libraries offer modal screens that are often a better fit.
A native on/off toggle, controlled through value and onValueChange, with trackColor and thumbColor for theming.
Sets the status bar's text style, visibility and (on Android) background. Render it per screen, or call the imperative methods when focus changes.
The modern touch wrapper with onPress, onLongPress, hitSlop and a style function receiving { pressed }. Add android_ripple for native feedback on Android.
Scrollable content and lists are the heart of most mobile screens. Pick ScrollView for short, bounded content and a virtualized list for anything that can grow.
Renders all children at once inside a scroll container. Fine for forms and short pages; it gets slow and memory-hungry with long dynamic lists.
Virtualized lists only mount rows near the viewport and recycle the rest. RN provides FlatList and SectionList; Shopify's FlashList is a popular faster alternative.
The default virtualized list: data, renderItem and a stable keyExtractor. Supports onEndReached for pagination, headers, footers and empty states.
A virtualized list grouped into sections with headers, optionally sticky, such as contacts sorted by letter.
Adds pull-to-refresh to a ScrollView or list through the refreshControl prop, with refreshing and onRefresh driving it.
Most code is shared, but iOS and Android differ in design conventions, permissions and APIs. Branch as close to the difference as possible instead of forking whole screens.
Platform.OS and Platform.Version for checks, and Platform.select({ ios, android, default }) to choose values or components inline.
Metro picks Button.ios.tsx or Button.android.tsx automatically when you import ./Button. Use it when a component differs substantially per platform; .native.tsx separates native from web.
Implements RN components and APIs on top of the DOM, so the same code runs in browsers. Expo uses it for its web target.
Styles are JavaScript objects with camelCased properties and unitless density-independent numbers. There is no cascade, so sharing happens through components, theme objects or libraries like NativeWind.
StyleSheet.create groups named styles and validates them in development. Pass arrays like [styles.base, active && styles.active] to compose them.
Layout uses Yoga's Flexbox. Unlike the web, flexDirection defaults to column and flex takes a single number; percentages, gap and absolute positioning are supported.
Set accessibilityLabel, accessibilityRole (or role) and accessibilityState, keep touch targets around 44 points, and test with VoiceOver and TalkBack.
RN provides the web's fetch, XMLHttpRequest and WebSocket APIs. Mobile networks drop and change constantly, so plan for retries, timeouts, offline states and caching (TanStack Query is a common choice).
@react-native-community/netinfo reports connection type and reachability and emits change events. Being "connected" does not guarantee the internet is reachable.
The standard WebSocket class for real-time data. Reconnect with backoff, and expect the socket to die when the app is backgrounded.
Promise-based HTTP with fetch(url, { method, headers, body }). Check response.ok yourself, and use AbortController for timeouts. Android blocks cleartext HTTP by default.
Remote notifications go through Apple Push Notification service and Firebase Cloud Messaging. Ask for permission at a meaningful moment, send the device token to your server, and handle taps that open the app. expo-notifications wraps both platforms behind one API.
Touch, gestures, navigation and motion are what make an app feel native. Keep feedback instant and run animations and gestures on the UI thread where possible.
The older TouchableOpacity, TouchableHighlight and TouchableWithoutFeedback wrappers. They still work, but Pressable is the recommended replacement.
React Native Gesture Handler recognises pans, pinches, long presses and flings natively, composable with Gesture.Simultaneous and friends. The built-in responder system is the low-level fallback.
Paging carousels with pagingEnabled or snapToInterval, swipe-to-delete rows, and horizontal lists. Watch for nested scroll conflicts between gestures and scroll views.
React Navigation provides stack, tab and drawer navigators backed by native screens; Expo Router builds file-based routing on top of it. Both handle deep links and the Android back button.
The built-in Animated API (use useNativeDriver: true) and LayoutAnimation, or Reanimated, whose worklets run on the UI thread for smooth gesture-driven motion.
Deep links open a specific screen from a URL: custom schemes like myapp:// or verified web links (iOS Universal Links, Android App Links). The Linking API reads incoming URLs and your navigator maps them to routes.
Anything shipped in the bundle can be extracted, so never embed secrets; proxy third-party APIs through your server. Use HTTPS everywhere (consider certificate pinning for high-risk apps), keep tokens in the platform keystore rather than plain storage, and request only the permissions you need.
Use OAuth 2.0 with PKCE through the system browser (expo-auth-session, react-native-app-auth), not an embedded web view. Store refresh tokens in secure storage and refresh access tokens silently.
Camera, location, notifications and photos need runtime permission. Declare usage strings in Info.plist and the Android manifest, ask in context, and handle "denied forever" by linking to settings.
Choose storage by data shape and sensitivity: key-value for preferences, the keystore for secrets, SQLite for structured or queryable data, and the file system for media and downloads.
An unencrypted, asynchronous key-value store for strings, the usual place for settings and cached state. Serialise objects with JSON.stringify and never put tokens here.
Encrypted key-value storage backed by the iOS Keychain and Android Keystore, meant for tokens and small secrets. Values have a size limit, so keep large data elsewhere.
Reads, writes, downloads and deletes files in the app's document and cache directories. Use it for offline media, exports and large blobs.
An embedded SQLite database with an async API, transactions and prepared statements. Pairs well with Drizzle ORM for typed queries and migrations.
MMKV for very fast synchronous key-value storage, WatermelonDB for large offline-first datasets, and Realm for an object database with sync.
Test logic with unit tests, screens with component tests that render and interact like a user, and critical flows with a few end-to-end tests on real builds. Native modules need mocks in Jest.
The default test runner, preconfigured through the react-native (or jest-expo) preset. Mock native modules in a setup file, and use fake timers for time-based code.
Renders components to a plain object tree for snapshot tests. It is deprecated as of React 19, so prefer Testing Library for new tests.
Renders components and queries them the way a user would (getByText, getByRole), then fires events with userEvent. It encourages tests that survive refactors.
Grey-box end-to-end testing from Wix that synchronises with the app's idle state, so tests rarely need manual waits. Runs on simulators and emulators in CI.
Black-box E2E automation over the WebDriver protocol. Language-agnostic and works on any app, but it is slower and flakier than Detox for RN-specific suites.
Smoothness depends on two threads hitting 60 or 120 fps: the JavaScript thread running your React code and the UI thread drawing native views. Measure with release builds, since development mode is much slower.
At 60 fps each frame has about 16.7 ms. Busy JavaScript drops frames in logic-driven UI; native work like layout and image decoding drops UI-thread frames. The perf monitor shows both.
Leftover console.log calls, unnecessary re-renders, large images, heavy work on mount, and JS-driven animations. Memoise expensive components and defer non-urgent work until after interactions.
Build only the active architecture for Android during development, cache native compilation with ccache, and use EAS or CI caches for dependencies.
Provide getItemLayout for fixed-height rows, tune windowSize, initialNumToRender and maxToRenderPerBatch, keep renderItem stable and rows memoised.
Inline requires delay loading a module until first use, cutting startup time. RAM bundles were a JSC-era technique; with Hermes bytecode, inline requires remain the useful part.
Use the React Profiler in DevTools for render costs, Hermes sampling profiles for JavaScript, and Xcode Instruments or Android Studio's profiler for native CPU and memory.
When no library exposes a platform API, write a native module. Turbo Native Modules use a typed JavaScript spec and Codegen to generate the bindings; Expo Modules API offers a simpler Swift/Kotlin DSL.
Implement the spec in Objective-C++ or Swift, link it through CocoaPods, and access Apple frameworks such as HealthKit or AVFoundation. Remember to run pod install after adding it.
Implement the spec in Kotlin or Java, register it through a package, and build with Gradle. Mind threading: blocking calls must not run on the main thread.
Release builds need signing, versioning, store listings and review. EAS Build and EAS Submit automate much of it, and over-the-air updates can ship JavaScript-only fixes between store releases.
Needs a paid Apple Developer account, a distribution certificate and provisioning profile, and an archive uploaded to App Store Connect. Test through TestFlight and read the review guidelines first.
Generate an upload key, build a signed Android App Bundle (.aab), and roll out through internal, closed and production tracks in the Play Console.