Zhuinden / simple-stack

[ACTIVE] Simple Stack, a backstack library / navigation framework for simpler navigation and state management (for fragments, views, or whatevers).
Apache License 2.0
1.36k stars 76 forks source link

Koin integration sample #227

Closed Zhuinden closed 3 years ago

Zhuinden commented 4 years ago

To be honest, I never saw a need for Koin. Their scoping is very similar to what Simple-Stack is doing, with the caveat that they don't offer lifecycle callbacks and state persistence (they expect you to use Jetpack ViewModel and SavedStateHandle to achieve it).

Theoretically if I were to expose providers from Koin, it wouldn't be too hard to channel those over into simple-stack, considering Koin is already a globally accessible singleton instance. So you see it from keys and is compatible with DefaultServiceProvider.HasServices.

People would love it, because people love Koin.

paolovalerdi commented 4 years ago

As a newbie, this would be very appreciated!

Zhuinden commented 3 years ago

Koin isn't really needed when using Simple-Stack.

If this ever happens, it would be as a separate sample, but not in this repository.

Technically it could also be a community-sample but I don't intend to add one, as it really is just funneling over Koin's provider {}s but if you're not opting into the Jetpack ecosystem, Simple-Stack's scoped services already handle this stuff anyway.