React Native is Meta's open-source framework for building cross-platform mobile applications using JavaScript and React, enabling a single codebase to compile to native iOS and Android apps. Since React Native 0.76, the New Architecture (JSI, Fabric, TurboModules) ships as the default, eliminating the legacy async bridge in favor of synchronous JavaScript-to-native calls, concurrent rendering, and native-quality animations via Reanimated worklets. React Native 0.78 added React 19 support — including Actions, useActionState, useOptimistic, and ref-as-props — while 0.79 brought Metro deferred hashing, stable package exports resolution, and faster Android startup via uncompressed JS bundles. Understanding React Native's component system, navigation patterns, Flexbox layout, platform APIs, and performance techniques is essential for shipping production-ready apps that feel truly native while maintaining JavaScript development speed.
What This Cheat Sheet Covers
This topic spans 18 focused tables and 209 indexed concepts, 187 flashcards. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
A jump-to index of every table row in this cheat sheet.
An interactive map of every table and concept in this topic.
Table 1: Core Components
These are the building blocks you reach for on almost every screen — the primitives React Native maps straight onto native iOS and Android views. The most important distinction to internalize early is FlatList/SectionList (virtualized, render only what's visible) versus ScrollView (renders everything at once): get that choice right and long lists stay smooth, get it wrong and they stutter. Pressable is the modern touch primitive that supersedes the older Touchable* family for new code.
| Component | Example | Description | |
|---|---|---|---|
<View style={{flex: 1}}> <Text>Hello</Text></View> | • Fundamental container that maps directly to a native view on each platform • supports Flexbox, styling, touch handling, and accessibility. | ||
<Text style={{color: 'blue'}}> Welcome</Text> | • Displays text with nested style inheritance • supports press events, numberOfLines truncation, and accessibility labels. | ||
<TextInput placeholder="Email" onChangeText={setText}/> | • Captures user text with controlled or uncontrolled behavior • supports keyboard types, autocorrect, secure entry, and multiline. | ||
<Pressable onPress={...} style={({pressed}) => [...]}> | • Modern touchable with press-state feedback via callback style • preferred over TouchableOpacity for new code; supports long press and accessibility. | ||
<FlatList data={items} keyExtractor={i => i.id} renderItem={({item}) => <View />}/> | • High-performance virtualized list that only renders visible items • supports pull-to-refresh, infinite scroll, and horizontal mode. | ||
<ScrollView> {data.map(item => <View />)}</ScrollView> | • Scrollable container that renders all children immediately • use for small, bounded lists where virtualization is not needed. | ||
<SectionList sections={[{title:'A', data:[...]}]} renderItem={...}/> | • Virtualized list with section headers • ideal for grouped data such as alphabetical contacts or categorized content. | ||
<Image source={{uri: 'https://...'}} style={{width: 50, height: 50}}/> | • Renders images from network, local files, or static resources • supports resizeMode, loading indicators, and caching. | ||
<Modal visible={show}> <View>...</View></Modal> | • Displays content above the rest of the app • supports fullScreen, pageSheet presentation styles and animation types. | ||
<Button title="Submit" onPress={handlePress}/> | • Platform-styled button with limited customization • use Pressable for custom designs. | ||
<SafeAreaView style={{flex: 1}}> <View>...</View></SafeAreaView> | • Adds padding to avoid notches and system UI on iOS • does not work on Android — use react-native-safe-area-context instead. | ||
<KeyboardAvoidingView behavior="padding" keyboardVerticalOffset={80}> | • Adjusts view when keyboard appears • behavior options: padding, height, position. | ||
<ActivityIndicator size="large" color="#0000ff"/> | • Platform-native loading spinner • uses UIActivityIndicatorView on iOS, ProgressBar on Android. | ||
<StatusBar barStyle="dark-content" backgroundColor="#fff"/> | • Controls device status bar appearance • set bar style, background (Android), and visibility globally or per-screen. | ||
<Switch value={enabled} onValueChange={setEnabled}/> | • Platform-styled toggle • renders as UISwitch on iOS and Switch on Android with native animations. | ||
<ScrollView refreshControl={<RefreshControl refreshing={loading} onRefresh={fn} />}> | • Adds pull-to-refresh to scrollable components • supports custom colors and tint. | ||
<ImageBackground source={bg}> <Text>Content</Text></ImageBackground> | • Renders children on top of a background image • takes same props as Image plus imageStyle for separate image styling. | ||
<TouchableOpacity onPress={...} activeOpacity={0.7}> | • Reduces opacity on press for visual feedback • superseded by Pressable for new code. | ||
<VirtualizedList data={data} getItem={(d,i) => d[i]} getItemCount={d => d.length}/> | • Base virtualized list underlying FlatList and SectionList • use directly when data is not a plain array. |