CodeBlanks Logo Icon CodeBlanks

What is React Native?

Learn that React Native is a mobile app development framework.

What is React Native?

React Native is a mobile framework that lets you build iOS and Android apps with JavaScript. It is developed by Meta (formerly Facebook) and compiles to both platforms from a single codebase.

Unlike web technologies, it uses the device's native components instead of a browser. So <View> is actually a ViewGroup on Android and a UIView on iOS.

This course uses React Native 0.7x and Expo for development.

Developing with Expo

Expo is a framework built on top of React Native. It lets you start, test and ship your app without setting up a native build environment.

To create an Expo project, you run npx create-expo-app in the terminal. This command downloads all required dependencies and creates a ready-to-use App.js file.

By installing the Expo Go app on your phone and scanning a QR code, you can see your app on the device instantly.

Practice Write the import

Import the View and Text components from the react-native package.

Starter code

App.js
// Import View and Text here

Sample solution

App.js
import { View, Text } from 'react-native';

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 Which platforms does React Native target?

  • Only web browsers
  • Only iOS
  • Only desktop
  • iOS and Android Correct answer

Explanation: React Native compiles for iOS and Android.

2 Match the concepts

Term Meaning
React Native Mobile framework
Expo Development toolkit
JavaScript Programming language
JSX Markup syntax

3 Import syntax

Question
import { View, ____ } from 'react-native';
Answer
import { View, Text } from 'react-native';

Explanation: The Text component also comes from react-native.

All lessons in Beginner