Skip to content
Mobilebeginner

What is React Native?

Updated Nov 30, 20263 min readBased on official documentation
What is React Native?

In short

React Native is an open-source framework for building mobile apps for Android and iOS using JavaScript and React. You write one codebase and it renders real native user interface components on each platform, so the app looks and feels native rather than like a web page inside a shell.

What React Native does

React Native lets you build mobile apps with JavaScript. It uses React, a popular library for building user interfaces, as its way of describing screens. Instead of drawing pixels in a browser, React Native maps your screen description to the building blocks that Android and iOS already provide, such as buttons, text fields and scrollable lists. These building blocks are called native components.

This is the key difference from a website wrapped in an app. The user sees the platform's own controls, so the app behaves the way people expect on their phone.

How it works

You write components as JavaScript functions. Each component returns a description of what should appear on screen. React Native reads that description and creates the matching native views on the device. When your data changes, React updates the screen, and React Native applies the change to the native views.

You do not need to write Kotlin, Java, Swift or Objective-C for most screens. You do need to understand JavaScript basics first, such as variables, functions and objects. If you are new to JavaScript, the Mozilla Developer Network has good introductory material.

A small example shows the idea. The following component displays a greeting and a button:

import React, { useState } from 'react';
import { Button, Text, View } from 'react-native';

export default function Counter() {
  const [count, setCount] = useState(0);

  return (
    <View>
      <Text>You pressed the button {count} times.</Text>
      <Button title="Press me" onPress={() => setCount(count + 1)} />
    </View>
  );
}

The View and Text names come from React Native, not from HTML. A View is a container, similar to a box. A Text element holds words. The useState function stores the count, and each press updates it.

When to use it

React Native fits well when you want one team and one JavaScript codebase to ship apps on both Android and iOS. It also suits teams that already know React from building websites. Many screens, forms and lists can be shared between platforms.

It is less suitable when an app needs deep access to a very new platform feature, or when performance-heavy graphics are the main goal. In those cases you may still need native code, which React Native allows you to add. Developers who prefer a different approach sometimes choose Flutter, which uses its own rendering engine and the Dart language. You can read about it in our guide to What is Flutter?.

Getting started

The official documentation is organised as a book you can read from start to finish, or you can jump to the sections you need. If you already know React, you can skip the React introduction or read it as a quick refresher. The docs also include an interactive example in the browser, provided by Expo's Snack Player, so you can edit code and see the result without installing anything.

The official getting started instructions now live in their own section of the documentation. Follow those steps to set up your environment before you build your first real screen. Start with the official guide: React Native getting started.

Common mistakes

Beginners often expect React Native to behave exactly like a web page. It does not. Styles are written as JavaScript objects, and layout uses a flexbox model with names that differ from CSS. Also, do not assume that a platform-specific feature will work the same way on both systems. Developers coming from the web may find it useful to know that the platform differences are documented, so check the notes for Android and iOS when a component behaves differently.

Another frequent mistake is skipping JavaScript fundamentals. Spend time on functions, arrays and objects before you try to build a complete app. The rest of React will make far more sense once those basics feel natural.

Alternatives

React Native is one of several ways to build mobile apps. A web app that can be installed on a phone is another option, and you can learn more in our guide to What is a Progressive Web App?. Some teams prefer fully native development with Swift or Kotlin, which gives direct access to every platform API. The right choice depends on your team's skills, the features your app needs and how much code you want to share between platforms.

FAQ

Do I need to know native Android or iOS development to use React Native?

No. You can build many screens with JavaScript and React alone. The documentation says it assumes no prior knowledge of React, Android or iOS, although those topics are useful to study later.

Is React Native the same as React?

No. React is a library for building user interfaces. React Native uses React's ideas but renders to native mobile components instead of web elements in a browser.

Can I try React Native without installing anything?

Yes. The documentation includes interactive examples that run in the browser through Expo's Snack Player, so you can edit code and see the result right away.

What should I learn before starting React Native?

Learn JavaScript fundamentals first. The official docs list them as a prerequisite, and the Mozilla Developer Network offers good material if you need a refresher.

Sources

This page is based on the official documentation below. Read it for full detail.

React Native — official documentation ↗

React Native in the news

blozhikDeveloper news from across the web, explained. Every story links to its original sources.