Getting Started
Choose your path based on your current situation:
New React Native Project
For new projects, we recommend starting with Expo for the best developer experience and similar remote caching capabilities. Use this template for sensible defaults. Rock is designed for teams who have outgrown the Community CLI.
To create a new React Native project with Rock:
The command will ask you to pick your preferred bundler and platforms.
Migrate from Community CLI
If you have an existing React Native project using Community CLI:
This will automatically detect your existing project and guide you through the migration process.
If automatic migration doesn't work for your project, check the detailed migration guide for manual instructions.
Add to Existing Native Project
For iOS/Android teams wanting to add React Native to existing apps, see our Brownfield documentation for step-by-step 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:
Running the iOS app
To build and run your app on an iOS simulator or device, run the run:ios command:
Running the Android app
To build and run your app on an Android emulator or device, run the run:android command:
Running the HarmonyOS app (experimental)
To build and run your app on a HarmonyOS emulator or device, run the run:harmony command:
Next Steps
- Learn about CLI commands and features
- Set up Remote Cache
