LiveData vs SharedFlow and StateFlow in MVVM and MVI Architecture

This page summarizes the projects mentioned and recommended in the original post on /r/androiddev

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • simple-stack-ftue-sample

    [DEMO] Sample code to display "First-Time User Experience" in a Single-Activity app using Simple-Stack, based on the "Conditional Navigation" section by Google.

  • A simplified variation can be seen in this repo, a LiveData variant with Jetpack stuff can be seen in this repo, my issue with this sample is that as there is no input + debounce + filter + async data load example in it, there is no switchMap (and even for combineTuple, I can use my other helper validateBy here), and those would be key to understanding the difference in terms of expressibility and power...

  • jetpack-navigation-ftue-sample

    [DEMO] Sample code to display "First-Time User Experience" in a Single-Activity app using Jetpack-Navigation, NavGraphs, Dagger, SavedStateHandle, Hilt, and EventEmitter - based on the FTUE example code in simple-stack-tutorials, but originally described by Google.

  • A simplified variation can be seen in this repo, a LiveData variant with Jetpack stuff can be seen in this repo, my issue with this sample is that as there is no input + debounce + filter + async data load example in it, there is no switchMap (and even for combineTuple, I can use my other helper validateBy here), and those would be key to understanding the difference in terms of expressibility and power...

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • live-event

    [ACTIVE] Lifecycle-aware wrapper over EventEmitter, for modelling one-off events.

  • Well I've been using this which is merely a lifecycle-aware wrapper over this, if you're in Kotlin and you are using coroutine stuff then you can also use Channel(UNLIMITED) with receiveAsFlow()

  • event-emitter

    [ACTIVE] The event emitter allows you to register multiple observers, but enqueue events while there are no observers.

  • Well I've been using this which is merely a lifecycle-aware wrapper over this, if you're in Kotlin and you are using coroutine stuff then you can also use Channel(UNLIMITED) with receiveAsFlow()

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts