# Compose sample app: UI state with Flow, offline first

DevFeed: [Compose sample app: UI state with Flow, offline first](<https://devfeed.tech/articles/compose-sample-app-ui-state-with-flow-offline-first-22656.md>)

Original publisher: [Read original article](<https://www.valueof.io/blog/compose-ui-state-flow-offline-first-repository>)

Author: James Shvarts

Published: 2022-06-25T04:20:32Z

Content type: tutorial

Language: en

Sources: [Android Blog - Mobile Dev Notes](<https://devfeed.tech/sources/android-blog-mobile-dev-notes.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [reactive](<https://devfeed.tech/topics/reactive.md>), [Android](<https://devfeed.tech/topics/android.md>), [Persistence](<https://devfeed.tech/topics/persistence.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [compose](<https://devfeed.tech/tags/compose.md>), [database](<https://devfeed.tech/tags/database.md>), [flow](<https://devfeed.tech/tags/flow.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [offline](<https://devfeed.tech/tags/offline.md>), [persistence](<https://devfeed.tech/tags/persistence.md>), [state](<https://devfeed.tech/tags/state.md>), [ui](<https://devfeed.tech/tags/ui.md>)

## AI overview

This tutorial presents an Android sample app built with Jetpack Compose and Kotlin Flow. It explains UI state modeling, an offline-first reactive repository backed by a Room database, unit testing with Turbine, and composition optimization lessons.

## Source excerpt

Sample repo implementing state using Flow, Offline First repository, unit tests using Turbine.