https://kotlinlang.org logo
Title
s

Shawn Tucker

04/01/2021, 6:32 PM
Hello, what should I do when my
store
is too big to be persisted? Until today, I reflected in my
state
object, which
data
I should query. This is important because my
data
can be too big for my
savedStateHandle[android]
to restore. The problem I am facing with this approach is that sometime my
state
depends on the
data
and sometime the
data
depends on my
state
. Any suggestions/articles that address that
state != data
and can help me find a better approach that solves the issues I am facing?
a

Arkadii Ivanov

04/01/2021, 6:50 PM
Hello. It is not clear what is actual problem is you facing, so could you please elaborate? Specifically what you mean by
state
depends on the
data
etc, and why is that causes any issues?
If I understand the problem correctly, you can drop the excessive data when saving the state. As described in the docs: https://arkivanov.github.io/MVIKotlin/state_preservation.html You should be able to do the same with SavedStateHandle.