# Compile and run a sample project (/en/realtime-media/video/build/join-and-manage-channels/compile-run-sample-project/react-native)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Agora provides [Open-source sample projects on GitHub](https://github.com/AgoraIO-Extensions/react-native-agora/tree/main/example) to demonstrate the implementation of basic and advanced Video SDK features.

    This page shows how to compile, configure, and run the Video SDK React Native sample project.

    
  
      
  
      
  
      
  
## Prerequisites [#prerequisites]

      
  
      
  
      
  
      
  
      
  
      
    * React Native 0.60 or later. For more information, see [Get Started with React Native](https://reactnative.dev/docs/environment-setup).
    * Node 16 or later
    * The following, depending onyourtarget platform:

    <CodeBlockTabs defaultValue="tab1">
      <CodeBlockTabsList>
        <CodeBlockTabsTrigger value="tab1">
          Android
        </CodeBlockTabsTrigger>

        <CodeBlockTabsTrigger value="tab2">
          iOS
        </CodeBlockTabsTrigger>
      </CodeBlockTabsList>

      <CodeBlockTab value="tab1">
        * A machine running macOS, Windows, or Linux
          * [Java Development Kit (JDK) 11](https://openjdk.org/projects/jdk/11/) or later
          * Latest version of Android Studio
          * A physical or virtual mobile device running Android 5.0 or later
      </CodeBlockTab>

      <CodeBlockTab value="tab2">
        * A machine running macOS
          * Xcode 10 or later
          * CocoaPods
            * A physical or virtual mobile device running iOS 9.0 or later.
              If you use React Native 0.63 or later, ensure your iOS version is 10.0 or later.
      </CodeBlockTab>
    </CodeBlockTabs>

    
  
      
  
      
  
      
  
      
  
      
  
      
  
{ /*
  - If a firewall is deployed in your network environment, refer to [Connect through restricted networks with Cloud Proxy](/en/realtime-media/video/manage-agora-account) to use Agora services normally.
  */ }

* A camera and a microphone

* A valid Agora account and project. Please refer to [Agora account management](/en/realtime-media/video/manage-agora-account) for details.

* Installed [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)

## Project setup [#project-setup]

      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
    ### Get the sample project [#get-the-sample-project-7]

    Run the following command to clone the repository locally:

    ```bash
    git clone git@github.com:AgoraIO-Extensions/react-native-agora.git
    ```

    This repository contains sample projects for Agora Video SDK:

    | Description                                       | Path                             |
    | :------------------------------------------------ | :------------------------------- |
    | Basic functions                                   | `/example/src/examples/basic`    |
    | Advanced features                                 | `/example/src/examples/advanced` |
    | [Hook](https://react.dev/reference/react) example | `/example/src/examples/hook`     |

    ### Configure the sample project [#configure-the-sample-project-7]

    1. Install dependencies

       Switch to the root directory and run the following commands to integrate the SDK and install dependencies:

       ```bash
       yarn
       ```

    2. Set your App ID and App Token

       Open the `/example/src/config/agora.config.ts` file and fill in the App ID and temporary token you obtained from the Agora Console.

       ```typescript
       // Agora App ID
       let localAppId = '';
       try {
           localAppId = require('./appID').default;
           console.log('appID', localAppId);
       } catch (error) {
           console.warn(error);
       }

       const config = {
           appId: localAppId,
           // Agora app token
           token: '',
           // Agora channel ID
           channelId: 'test',
           uid: 0,
           logFilePath: '',
       };

       export default config;
       ```

    
  
      
  
      
  
      
  
      
  
## Run the sample project [#run-the-sample-project]

      
  
      
  
      
  
      
  
      
  
      
  
      
  
      
    1. Execute the following command in the project root directory to run the sample project.

       * Target platform Android

         ```bash
         yarn example android
         ```

       * Target platform iOS

         ```bash
         yarn example ios
         ```

    2. After the operation is complete, the following application appears on your device:

       ![](https://assets-docs.agora.io/images/video-sdk/run-compile-rn-step-2.png)

       Showing Android as an example

    3. Select the demo you want to experience from the menu. Choose **JoinChannelVideo** under **Basic** as an example, and click **join channel**.

       ![](https://assets-docs.agora.io/images/video-sdk/run-compile-rn-step-3.png)

    4. To test various audio and video interaction use-cases, connect to the [Agora web demo](https://webdemo.agora.io/basicVideoCall/index.html), or install and run the sample project on a second device. Make sure you use the same app ID on both devices. When you join the same channel from two devices, you can see and hear each other.

    
  
      
  
      
  
      
  
      
  
