Skip to main content

Prerequisites

The React Native CLI quickstart supports iOS, Android, and macOS. The separate Expo quickstart supports native iOS and Android builds. Before getting started, ensure you have the following:
  • A code editor (Visual Studio Code is our recommendation, but any code editor will work)
  • Git installed on your machine
  • Node.js 20 or later installed on your machine
  • A Ditto Portal account with a configured Ditto Database (see Getting SDK Connection Details)
  • Android Studio installed on your machine
  • JDK 17 for the Expo Android project
  • A physical Android device or Android emulator
  • A macOS machine with Xcode 26.3 or later installed
  • A physical iOS device or iOS simulator

Get Started

1. Clone the Repository

  1. Open the terminal
  2. Clone the repository from GitHub.
  3. Navigate to the repository root:
    The quickstart repository contains both react-native (CLI) and react-native-expo variants. Choose the one that matches your preferred development approach.

2. Configure Ditto

In the Ditto Portal, open your database’s Connect via SDK tab and copy its Database ID, Development Token, and URL.

Add Ditto Credentials

  1. From the quickstart directory, copy .env.sample to .env and set the Database ID, Development Token, and Server URL. Both React Native variants read this file from the repository root.
  2. Set the three values in .env:

3. Run the Application

Choose either the React Native CLI or Expo project.
  1. From the quickstart directory, enter the CLI project and install dependencies:
  2. Run the app on your target platform:
  1. From the quickstart directory, enter the Expo project and install dependencies. The install runs patch-package automatically to apply the temporary Expo Modules Core workaround required by the Expo SDK 55 Worklets Prefab build:
  2. Generate the native projects and run on a connected device or simulator:
    Expo Go and Expo Web are not supported by this native Ditto quickstart.

4. Sync-Data Offline

  1. Launch the application on multiple devices or simulators
  2. Disconnect from your current WiFi network while keeping WiFi enabled on the device to allow for LAN connections
  3. Add, edit, and delete tasks and experience offline collaboration!

Next Steps

All the Ditto Quickstart apps work together! Try running a quickstart app in other languages and see them all collaborate.

Additional Resources