I'm using koin-compose and I have an issue using `...
# koin
r
I'm using koin-compose and I have an issue using `KoinScope`: when a component using a
KoinScope
is recomposed and switches koin scope, the new scope is created before the old one is closed, which might make sense, but how to work around that? Do I just manually close the other scope before calling
KoinScope
? My issue is that, while I have various potential scopes to switch to, 2 of those scopes are actually using the same Datastore, and you can't have multiple Datastore instances on the same file. I expected that the first Datastore would be closed before the second one was created, which would prevent any issue, but that's not what's happening. I could have this Datastore defined in the module containing all my scopes, but then it would exist in all other scopes.