View Model Doesn’t Have To Depend on ViewModel

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

Our great sponsors
  • SonarLint - Deliver Cleaner and Safer Code - Right in Your IDE of Choice!
  • OPS - Build and Run Open Source Unikernels
  • Scout APM - Less time debugging, more time building
  • GitHub repo PeopleInSpace

    Minimal Kotlin Multiplatform project with SwiftUI, Jetpack Compose, Wear Compose, Compose for Desktop, Compose for Web and Kotlin/JS + React clients along with Ktor backend.

    Here's a project using it.

  • GitHub repo koin

    Koin - a pragmatic lightweight dependency injection framework for Kotlin

    It'd be great if it worked

  • SonarLint

    Deliver Cleaner and Safer Code - Right in Your IDE of Choice!. SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.

  • GitHub repo Dagger2

    A fast dependency injector for Android and Java.

    Technically, their Jetpack Navigation integration using this somewhat awkwardly named public method does resolve the issue, but then you're forced to use Jetpack Navigation and ViewModelStoreOwner and the rest, because that's the only thing it works with. And AFAIK the SavedStateProvider in SavedStateHandle is private, so you can't even register a custom SavedStateHandle to the SavedStateRegistry yourself - basically, vendor lock-in because the API was not designed to be extensible beyond what Google internals needed.

  • GitHub repo kompass

    Kotlin Multiplatform Router for Android and iOS

    kompass seems promising for navigation. Though it's not that difficult to maka a router with SharedFlow of routes (sealed interface or something) and subscribe for it in activity for navigation. I guess something similar could be done in iOS.

  • GitHub repo Slide

    Slide is an open-source, ad-free Reddit browser for Android.

    "Works for me" just like how "Multi-activity works for me", "Singleton state works for me", "3000 line Fragments with nested AsyncTask work for me" -- the fact that it runs is the least minimal requirement that is expected of any software, and when you have quirky runtime bugs like in Koin or Jetpack Navigation, then it doesn't even hit that bar.

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