Create a React Native App

Last update: 2024-01-11
Type
Quick Win's logo Quick Win
Membership
🆓
Tech
React Native React Native
React Native
TypeScript TypeScript
TypeScript
Share:

How do you create a React Native App in 2024? Well, it’s pretty simple when you know what you want!

Expo or not?

The first question you should ask yourself is: Do I want to use Expo or not?

If you don’t know what Expo is, check out my video on Expo vs React Native CLI.

Here on Galaxies.dev we highly recommend starting your app with Expo.

It’s the easiest way to get started, and you pretty much have now downsides, espeically for greenfield React Native apps.

Create a React Native App with Expo CLI

If you decide to start with Expo, you can use the following command to create a new React Native App:

Command
npx create-expo-app my-app

This will guide you through a dialog with questions about your app, like the name, the template, or whether you want Typescript.

Note: You can also use yarn or bun instead of npx if you prefer.

You can also use the following command to create a new React Native App from a template:

Command
npx create-expo-app my-app --template tabs

This would give you a React Native App with a tab navigation using the Expo Router.

Create a React Native App with React Native CLI

If you don’t want to use Expo, you first have to set up your React Native Development environment accordingly.

Then you can use the following command to create a new React Native App:

Command
npx react-native init my-app

This will create a new React Native App with the React Native CLI, and you can use the commands of the React Native Community CLI to run your app.

Create a React Native App with Create Expo Stack

If you want to use Expo, but you are a power user and want to directly configure different parts of your app, you can use the Create Expo Stack:

Command
npx create-expo-stack

With this command you can configure your app with different options, like the navigation, the styling or event include Supabase/Firebase directly into your app.

Create a Universal React Native App

If you want a more fancy setup for a universal app that contains a monorepository with a web and a native app, you could use the Tamagui package:

Command
npm create tamagui@latest

This will create a monorepository with NextJS for the web and Expo for the native app, combined using Solito and Tamagui for the styling of your components.

Create a React Native App with Ignite

If you want a battle-tested, opinionated setup for your React Native app, you can use Ignite:

Command
npx ignite-cli new my-app

This will create a React Native app with most choices about navigation, state management, and styling already made for you.

Simon Grimm

© 2023 Galaxies.dev. All rights reserved.