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. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Core Components
| 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. |