This is an example Expo app that demonstrates the following cases:
- How to use the @morrowdigital/watermelondb-expo-plugin
- A basic setup of WatermelonDB
- Morrow Blog / Build and Offline-First App with Expo Supabase and WatermlonDB
- Offline First with Supabase and WatermelonDB - Part 2 - Handling authentication
Using the @morrowdigital/watermelondb-expo-plugin
You can find more details in our blog-post: Using WatermelonDB with React Native Expo
This post also include a basic demo setup of WatermelonDB.
- Clone this repo
- run
npm install
oryarn install
- run
npx expo run:ios
ornpx expo run:android
Note: In order to run you need to build a dev-client. But since this example is now using expo SDK 50, it will automatically build one with the
npx expo run:<platform>
command. If you still encounter issues, then build a dev-client.
Follow the instruction in the blog post above, and create a Supabase project, along with the instructions on how to set up Supabase functions.
In the root directory create a .env
file and add the Supabase project URL and the Supabase Anon Key. (see .env.example
)
Run with dev client or npx expo run:ios
/ npx expo run:android
commands.