Quick start

Pre-requisites

If you're already familiar with JavaScript, React and React Native, then you'll be able to get moving quickly! Otherwise, it's highly recommended to get yourself familiar with these topic and then come back here:

Installation

To create a new React Native project with Rock, or migrate from React Native Community CLI, run:

npm
yarn
pnpm
bun
npm create rock

The command will ask you to pick your preferred bundler and platforms.

Migrating from React Native Community CLI

In case you want to adopt Rock in existing project (which is a typical scenario), and automatic migrating with npm create rock didn't work, please check the Migrating from Community CLI page for manual instructions.

Usage

Now that you have Rock configured, you should be able to use Metro's or Re.Pack's development server and bundle your application.

Running development server

When developing your application, you'll need to run a dev server that will use a bundler like Metro or Re.Pack to bundle your JS and later serve it to an app running on a device or simulator.

To start the development server, run:

npm
yarn
pnpm
bun
npm rock start

Running the iOS app

To build and run your app on an iOS simulator or device, run the run:ios command:

npm
yarn
pnpm
bun
npm rock run:ios

Running the Android app

To build and run your app on an Android emulator or device, run the run:android command:

npm
yarn
pnpm
bun
npm rock run:android
Need to boost your app's performance?
We help React Native teams enhance speed, responsiveness, and efficiency.