When using Voyager, what is the recommended way to...
# multiplatform
m
When using Voyager, what is the recommended way to provide objects to `ScreenModel`s using DI? I am using Kodein and would like to access a repository instance from my
ScreenModel
. My problem is that the
ScreenModel
must implement
JavaSerializable
since it gets serialised for state preservation. If I don't implement it, the app just crashes whenever screen orientation changes, the phone goes into standby mode, etc... This however makes injecting objects using Kodein annoying if I just define them in the `ScreenModel`class, since the serialisation process then tries to serialise the injected objects. This is the only way I found to work around it, but surely there is a better way?
k
Did you ever figure out a solution to this? I’m just trying out voyager and running into the same problem