How to use Koin with KMM ViewModel on desktop? I'm...
# koin
m
How to use Koin with KMM ViewModel on desktop? I'm trying to use the
@KoinViewModel
annotation, but it fails to generate.
Figured it out: 1. Need to add the
io.insert-koin:koin-compose-viewmodel
dependency. This module is missing from the list of modules at https://insert-koin.io/docs/setup/koin. I found it being added here: https://github.com/InsertKoinIO/koin/pull/1875/files 2. Set
USE_COMPOSE_VIEWMODEL
, I found this here: https://github.com/InsertKoinIO/koin-annotations/pull/138 Hope it helps.
👍 1
👍🏾 1