# Using Kotlin StateFlow for state management in Android

DevFeed: [Using Kotlin StateFlow for state management in Android](<https://devfeed.tech/articles/stateflow-end-of-livedata-25752.md>)

Original publisher: [Read original article](<https://blog.shreyaspatil.dev/stateflow-end-of-livedata-a473094229b3/>)

Author: Shreyas Patil

Published: 2020-05-22T15:49:15Z

Content type: tutorial

Language: en

Sources: [Shreyas Patil's Blog](<https://devfeed.tech/sources/shreyas-patil-s-blog.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [kotlin-coroutines](<https://devfeed.tech/topics/kotlin-coroutines.md>), [Coroutines](<https://devfeed.tech/topics/coroutines.md>), [Code](<https://devfeed.tech/topics/code.md>), [App](<https://devfeed.tech/topics/app.md>), [ui](<https://devfeed.tech/topics/ui.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [flow](<https://devfeed.tech/tags/flow.md>), [getting-started](<https://devfeed.tech/tags/getting-started.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [others](<https://devfeed.tech/tags/others.md>), [state-management](<https://devfeed.tech/tags/state-management.md>), [stateflow](<https://devfeed.tech/tags/stateflow.md>), [ui](<https://devfeed.tech/tags/ui.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

## AI overview

This tutorial explains how to use Kotlin Coroutines StateFlow for state management in Android, demonstrates it in a counter app, and compares its implementation with LiveData. It notes that StateFlow supports flow operators such as combine and zip, while some LiveData callback-style features were not yet supported at the time described.

## Source excerpt

Is StateFlow the end of LiveData? An opinionated look at how Kotlin's StateFlow is replacing LiveData for state management in Android.