Choose your path based on your current situation:
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.
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.
For iOS/Android teams wanting to add React Native to existing apps, see our Brownfield documentation for step-by-step instructions.
Now that you have Rock configured, you should be able to use Metro's or Re.Pack's development server and bundle your application.
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:
To build and run your app on an iOS simulator or device, run the run:ios
command:
To build and run your app on an Android emulator or device, run the run:android
command: