Sample App

A runnable Android sample lives in the repo's sample/android/ module — a single Compose screen that exercises every claim in the docs, so one run of the app is a real smoke test.

What it does

A default-store document, Documents.document<GameSave>("slot-1"), backs the first section:

Above the buttons, a live readout shows get() and exists(), plus a separate readout bound to fieldFlow(GameSave::coins, default = 0) — proving that a single decomposed field reacts on its own, independent of the whole-document flow.

A second section opens a separate Documents.collection("cache") holding a Draft document, with Edit draft and Clear draft buttons. The screen states its own test explicitly: editing the draft must never change the slot-1 readout above — proving the collection is backed by a genuinely separate MMKV file, isolated from the default store.

Run it

Clone the repository and run the sample:android module (Android only) from Android Studio or via Gradle. See Reactive UI State for the general pattern this sample demonstrates.