Skip to main content
React Native is built on top of React, so understanding React fundamentals is essential. This guide covers the core React concepts you’ll use every day in React Native development.

Components

Components are the building blocks of React Native apps. A component is a JavaScript function that returns JSX describing what should appear on screen.

Function Components

JSX Syntax

JSX lets you write markup inside JavaScript. In React Native, you use components like <View> and <Text> instead of HTML elements:

Props

Props (properties) let you pass data from parent to child components. Props are read-only and cannot be modified by the child.

Destructuring Props

Common pattern for cleaner code:

State

State is data that changes over time. When state changes, React re-renders the component.

useState Hook

Multiple State Variables

State updates are asynchronous. Don’t rely on the previous state value immediately after calling the setter.

Hooks

Hooks let you use state and other React features in function components.

useEffect Hook

Run side effects after rendering:

useEffect Cleanup

Common Hooks

Manage component state

Conditional Rendering

Render different content based on conditions:

Logical && Operator

Rendering Lists

Use map() to render arrays of data:
Always include a unique key prop when rendering lists. Keys help React identify which items have changed.

Component Composition

Build complex UIs by combining smaller components:

React Native-Specific Considerations

No HTML Elements

StyleSheet API

Event Handlers

Next Steps

Handling Text Input

Learn to work with forms and user input

Using Lists

Render large lists efficiently with FlatList