Skip to main content
React Native provides two types of building blocks: Components for UI elements you can see and touch, and APIs for accessing device features and functionality.

Components vs APIs

Components

Visual elements that appear in your app’s UI. Components return JSX to render.

APIs

JavaScript modules that provide device functionality without rendering UI.

Core Components

Components are the visual building blocks of your app. They’re React components that render native platform views.

View Component

The fundamental container component. On iOS it maps to UIView, on Android to android.view.View.
View.js (from React Native source)

Text Component

For displaying text. Unlike web, text must be inside a <Text> component.

Button Component

A basic button that works on all platforms. From the React Native source:
Button.js (from source)
The Button component renders differently on iOS and Android. On iOS, color changes the text color. On Android, it changes the background color.

Image Component

ScrollView Component

Wraps content to make it scrollable:

Touchable Components

For handling touch interactions:

APIs (Non-UI Modules)

APIs provide access to device features without rendering anything:

Alert API

Linking API

Vibration API

AppState API

Component Categories

React Native components fall into these categories:
  • View: Container for other components
  • Text: Display text
  • Image: Display images
  • Button: Basic button
  • ScrollView: Scrollable container
  • TextInput: Text input field
  • FlatList: Performant list for large datasets
  • SectionList: List with section headers
  • StatusBar: Control status bar appearance
  • ActivityIndicator: Loading spinner
  • Modal: Present content above other views
  • ToastAndroid: Android toast notifications
  • DrawerLayoutAndroid: Navigation drawer
  • ActionSheetIOS: iOS action sheets
  • InputAccessoryView: Keyboard accessory view

Using Components from Source

When you import a component from React Native:
These are loaded from react-native/Libraries/Components/. Each component is implemented as a React component that interfaces with native code.

Next Steps

React Fundamentals

Learn how to use props, state, and hooks with these components

Handling Text Input

Deep dive into the TextInput component