How do you guys handle storing persistant user dat...
# mvikotlin
n
How do you guys handle storing persistant user data with the MVI/ Decompose approach? Eg storing user id persistently (something like shared preferences for Android)
a
For "something like shared preferences for Android" you can use: •
SharedPreferences
if you are working on an Android project • Multiplatform Settings - if you are working on a KMP project In both case you can pass prefs directly to a
Store
via DI, or create some sort of a
XxxDataSource
which will work with prefs and pass the
XxxDataSource
to the
Store
. I use the latter.
👌 1