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 Specific Prerequisites
Android Specific Prerequisites
- Android Studio installed on your machine
- JDK 17 for the Expo Android project
- A physical Android device or Android emulator
iOS Specific Prerequisites
iOS Specific Prerequisites
- A macOS machine with Xcode 26.3 or later installed
- A physical iOS device or iOS simulator
Get Started
1. Clone the Repository
- Open the terminal
-
Clone the repository from GitHub.
-
Navigate to the repository root:
The quickstart repository contains both
react-native(CLI) andreact-native-expovariants. 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
- From the
quickstartdirectory, copy.env.sampleto.envand set the Database ID, Development Token, and Server URL. Both React Native variants read this file from the repository root. - Set the three values in
.env:
3. Run the Application
Choose either the React Native CLI or Expo project.React Native CLI
React Native CLI
-
From the
quickstartdirectory, enter the CLI project and install dependencies: -
Run the app on your target platform:
Expo
Expo
-
From the
quickstartdirectory, enter the Expo project and install dependencies. The install runspatch-packageautomatically to apply the temporary Expo Modules Core workaround required by the Expo SDK 55 Worklets Prefab build: -
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
- Launch the application on multiple devices or simulators
- Disconnect from your current WiFi network while keeping WiFi enabled on the device to allow for LAN connections
- Add, edit, and delete tasks and experience offline collaboration!