Hello everyone! I’ve released `compose-remember-se...
# feed
b
Hello everyone! I’ve released
compose-remember-setting
- Compose Multiplatform for remembering state persistently. Any feedback is welcomed! 🚀 API peek:
Copy code
val count: MutableState<Int> = rememberIntSetting(key = "intKey", defaultValue = 0)
https://github.com/burnoo/compose-remember-setting
👍 3
s
Oh wow, what a great idea. 💡 This makes me wonder why I didn’t come up with that. 😅
h
I think one things is missing which is store object data class. like library mulitplatform settings have to store object in string and get it back from string into gson. By the way, does this library support multiplatform any kind of platform?
🤔 1
s
It’s clearly stated in the description that it supports multiplatform.
👍 1
b
Multiplatform Settings Serialization currently does not support observing serialised values, so this library also does not support it (issue). Technically it would be possible to store data class as Json (as you mentioned), but it would require passing Json to Composable functions, and I would prefer avoid that in the library.
👍 1