Join Slack
Powered by
I haven’t fully understood why we wrap mutableStat...
# compose
a
Alexander Suraphel
11/02/2021, 2:04 PM
I haven’t fully understood why we wrap mutableStateOf with remember. Can someone please explain? Does a mutable state reset to initial value if it’s not wrapped in remember?
a
Archie
11/02/2021, 2:06 PM
This doc would most likely explain it better than if I try myself.
https://developer.android.com/jetpack/compose/state
a
Alexander Suraphel
11/02/2021, 2:08 PM
ok
@Archie
i’ll read the entire doc first
❤️ 1
z
Zach Klippenstein (he/him) [MOD]
11/02/2021, 3:49 PM
Also this might help:
https://dev.to/zachklipp/remember-mutablestateof-a-cheat-sheet-10ma
🙏 1
🔥 2
6
Views
Open in Slack
Previous
Next