Basic Components

React Native provides built-in components that map to native platform UI elements.

Core Components

ComponentPurpose
ViewContainer (like div)
TextDisplay text
ImageDisplay images
TextInputText input field
ScrollViewScrollable container
FlatListPerformant list
StyleSheetCreate styles
ActivityIndicatorLoading spinner
ButtonSimple button
PressableFlexible touchable

Example

import React from 'react'
import { View, Text, Image, StyleSheet } from 'react-native'

const ProfileCard = ({ name, avatar }) => (
  <View style={styles.card}>
    <Image
      source={{ uri: avatar }}
      style={styles.avatar}
    />
    <Text style={styles.name}>{name}</Text>
  </View>
)

const styles = StyleSheet.create({
  card: {
    padding: 16,
    alignItems: 'center',
    backgroundColor: '#fff',
    borderRadius: 8
  },
  avatar: { width: 80, height: 80, borderRadius: 40 },
  name: { fontSize: 18, fontWeight: 'bold', marginTop: 8 }
})
ℹ️ camelCase styles

React Native uses camelCase for style properties: backgroundColor not background-color, fontSize not font-size.