---
title: "Walkthrough: Getting started with JSS for React Native"
slug: "walkthrough--getting-started-with-jss-for-react-native"
abstract: "How to create and run an application with JSS React Native."
---
# Walkthrough: Getting started with JSS for React Native

This walkthrough describes how to create and run your first JSS for React Native application.

Before you can create an application with JSS for React Native, you must set up your development environment according to the [React Native guide](https://reactnative.dev/docs/environment-setup), as follows:

- The JSS application sample for React Native is based on a project created with the React Native CLI using the `react-native init` command. When you are setting up React Native, you must select the **React Native CLI Quickstart** tab.
    - In the new page view, choose your development and target operating systems from the available options.
    - Install any dependencies as directed by the React Native guide.
    - Confirm you can run the application created during this setup process.
- Familiarize yourself with the available [application modes](https://doc.sitecore.com/xp/en/developers/hd/23/sitecore-headless-development/application-modes-in-jss-react-native.html "Application modes in JSS React Native") for React Native apps built with JSS.
- Install the [JSS CLI](https://doc.sitecore.com/xp/en/developers/hd/23/sitecore-headless-development/install-the-jss-cli-globally.html "Install the JSS CLI globally").

> [!note]
> The basic app created with JSS for React Native has been tested with the following configurations and tools:
>
> -   Windows/Android, using a physical device connected using USB to the development machine.
>
> -   macOS / iOS, using the Xcode simulator.

This walkthrough describes how to:

- Create the application.
- Run the application.

<details>
<summary><h2>Create the application</h2></summary>

To create an application with JSS for React Native:

- Run the following command:

    ```text
    npx create-sitecore-jss@ver<version-number> react-native [--appName <your-app-name> --fetchWith [REST | GraphQL]]
    ```

    Replace `<version-number>` with the version you wish to use. For example, `21`.

    > [!note]
    > If choosing GraphQL, your application must be [connected to Sitecore](https://doc.sitecore.com/xp/en/developers/hd/23/sitecore-headless-development/walkthrough--connecting-a-jss-application-to-sitecore.html "Walkthrough: Connecting a JSS application to Sitecore"). GraphQL requests are not supported in [disconnected mode](https://doc.sitecore.com/xp/en/developers/hd/23/sitecore-headless-development/start-a-jss-app-in-disconnected-mode.html "Start a JSS app in disconnected mode").

</details>

<details>
<summary><h2>Run the application</h2></summary>

To start your JSS React Native application, run one of the following scripts in a terminal, depending on the application mode you are using:

- If you do not have a Sitecore instance available, start the application in [disconnected mode](https://doc.sitecore.com/xp/en/developers/hd/23/sitecore-headless-development/run-a-jss-for-react-native-app-in-disconnected-mode.html "Run a JSS for React Native app in disconnected mode"):

    > [!note]
    > You can find script definitions in the `package.json` file of your new JSS React Native application.

    - For an Android app:

        ```text
        jss start-android
        ```

    - For an iOS app:

        ```text
        jss start-ios
        ```

- If you have a Sitecore instance and want to develop against it, [connect and deploy your JSS application to Sitecore](https://doc.sitecore.com/xp/en/developers/hd/23/sitecore-headless-development/walkthrough--connecting-a-jss-application-to-sitecore.html "Walkthrough: Connecting a JSS application to Sitecore"), and then start the application in [connected mode](https://doc.sitecore.com/xp/en/developers/hd/23/sitecore-headless-development/run-a-jss-for-react-native-app-in-connected-mode.html "Run a JSS for React Native app in connected mode"):
    - For an Android app:

        ```text
        jss start-android:connected
        ```

    - For an IOS app:

        ```text
        jss start-ios:connected
        ```

The React Native build process opens one or two separate terminal window(s) or tab(s) containing the output from the React Native Metro bundler, and the output from a React Native platform-specific compiler, such as Xcode or Android SDK.

When the build process is completed, you can see the JSS React Native sample app in the simulator or on the screen of a physical device.

> [!note]
> The initial build can take several minutes. Subsequent builds are typically much faster. This is normal behavior for React Native.

</details>