I'm investigating possible migration of Decompose ...
# multiplatform
a
I'm investigating possible migration of Decompose to
SavedState
and
ViewModelStore
, since they both are now multiplatform. However, I noticed (correct me if I'm wrong) that the actual serialization of
SavedState
to bytes is only possible on Android. On all other targets the
SavedState
class is just a
Map<String, Any?>
. My question is probably for folks from Google and JetBrains: are there any plans of supporting the actual serialization of
SavedState
on non-Android targets? Or if it's already possible, I would like to learn how.
👀 6
👍 1
👍🏾 1
m
Hey Arkadii, long time no talk! You're right. Currently, serializing
SavedState
to bytes is only supported on Android. It’s definitely something we have discussed and would like to have in the future, but no ETA. I just realized there’s no public ticket for that, would you mind filing one? Also, while
SavedState
is KMP-compatible and is integrated with CMP, CMP doesn’t actually save state on non-Android platforms (yet). JetBrains is the best people to speak to that part. cc: @Ivan Matkov
a