Skip to content

A React Native app that lets you create tasks and sync them with Ditto.

License

Notifications You must be signed in to change notification settings

getditto/react-native-sample-app

Repository files navigation

Screenshot 1 Screenshot 2

Ditto Task Sync App

A sample React Native application that lets you create tasks and sync them with the Ditto Cloud via OnlinePlayground authentication. This example is built according to the official Ditto installation guide for React Native.

Prerequisites

  • Ditto Portal Account: Ensure you have a Ditto account. Sign up here.
  • App Credentials: After registration, create an application within the Ditto Portal to obtain your appID and token. Visit the Ditto Portal to manage your applications.

Getting Started

Clone the Repository

git clone https://github.com/getditto/react-native-sample-app.git
cd react-native-sample-app

Install Dependencies

yarn install

Configure App Credentials

Navigate to the App.tsx file and replace <Your-App-ID> and <Your-Token> with your actual appID and token obtained from the Ditto Portal.

Run the Application

yarn start

For iOS:

(cd ios && RCT_NEW_ARCH_ENABLED=1 pod install)
yarn react-native run-ios

For Android:

yarn react-native run-android

Features

  • Task Creation: Users can add new tasks to their list.
  • Real-time Sync: Tasks are synchronized in real-time across all devices using the same Ditto application.

Additional Information

  • Limitation: React Native's Fast Refresh must be disabled and it's something we're working on fixing.

Troubleshooting

Should you encounter any issues, please refer to the Ditto documentation or check the FAQs on the Ditto Portal.

Contact

For support or queries, reach out to us via [email protected].