Integrating the Dropbox Datastore API with Ractive.js
Ractive Datastore is a 40-line library that pairs Ractive.js two-way data binding with the Dropbox Datastore API for cross-device syncing. It maps key/value pairs onto the Datastore's table/record/field model by using a single table, the key as the record ID, and a single "value" field. getOrInsert initializes each key with a default without overwriting existing synced values. The Datastore SDK has since been deprecated.
Related posts
- Offline-first React Native Apps with Expo, WatermelonDB, and Supabase
Supabase mediumAdeptAn offline-first React Native/Expo app can use WatermelonDB (SQLite-based, last-write-wins sync) as its local store and sync to Supabase Postgres through two RPC calls: a `push` function that applies client changesets and a `pull` function that returns all changes since the last sync timestamp. The walkthrough covers adding simdjson via expo-build-properties, defining WatermelonDB models, and writing the PL/pgSQL push/pull and epoch-conversion functions, with soft deletes tracked via deleted_at/last_modified_at. The main tradeoff is friction when changing the data model, since the Postgres schema, the local WatermelonDB schema and the sync functions must all be kept in step. That makes the approach best suited to apps with a stable schema where snappy interactions matter.
- Local-first Realtime Apps with Expo and Legend-State
Supabase mediumAdeptExpo and React Native apps can go local-first by pairing Legend-State's sync engine with Supabase. Changes are written to Async Storage and retried with exponential backoff until Supabase confirms them, then server fields like updated_at are merged back into local state. The walkthrough configures syncedSupabase with incremental 'last-sync' diffs, soft deletes and realtime, and uses a Postgres trigger to maintain created_at/updated_at. It also covers generated TypeScript types, observer components for fine-grained re-renders, and client-side UUID generation for offline inserts.
- Comparing local-first frameworks and approaches
Neon easyNovice
Local-first software keeps data on the user's device and syncs opportunistically, and three representative approaches take different routes to it. Automerge uses CRDTs to merge concurrent edits without a coordinating server. PouchDB is a browser-side document database that syncs with CouchDB and resolves conflicts by deterministically picking a winning revision while keeping the losers for manual resolution. ElectricSQL is a server-side sync engine that reads Postgres logical replication and streams subsets of data ("shapes") to clients. Short code samples show each API, framed by the seven ideals of the Ink & Switch local-first manifesto.
- Introducing React Native Bindings for Turso
Turso mediumAdept`@tursodatabase/sync-react-native` is a single package that gives React Native apps on iOS and Android an embedded, SQLite-compatible Turso database plus optional bidirectional sync with Turso Cloud via `pull` and `push`, enabling offline-first apps. The native JSI layer is kept thin as a bridge to SDK-KIT, while async network IO and SDK logic live in TypeScript; this makes debugging, unit testing and iteration easier without native rebuilds. The bindings require React Native 0.76+ with the New Architecture and iOS 13.0+. Partial sync, an Expo plugin and real-time subscriptions are planned.
- Management of Native Code and React Native at Shopify
Shopify Engineering mediumAdeptShopify's Point of Sale team kept complex UI such as a draggable, reorderable grid of hundreds of buttons in React Native, fixing performance with fewer re-renders, lazy rendering, memoization and Reanimated 2. Background offline sync jobs were a different story: they froze the app because work in single-threaded JavaScript plus bridge traffic blocked interaction. The team moved that sync engine to a Kotlin Multiplatform library using SQLDelight, Apollo and coroutines, reaching about 95% shared code and cutting initial sync for a medium store from 30+ seconds to 2-3 seconds. The post recommends packaging KMM as a separate library with sandbox apps, sketches the Gradle and Xcode build setup, and notes the steeper learning curve for Swift developers.