Join Slack
Powered by
hello, what would be the best way to keep a list o...
# compose-desktop
g
Glenn Martin
03/07/2021, 4:37 AM
hello, what would be the best way to keep a list of global states that get updated constantly by background thread? currently just adding a bunch of
mutableStateOf
on the main class at the top of my app
t
theapache64
03/07/2021, 6:06 AM
are u looking at something like redux ?
g
Glenn Martin
03/07/2021, 12:13 PM
no not really, just new to mobile/desktop so wondering what the convention is
Glenn Martin
03/07/2021, 12:13 PM
I hate redux btw
t
theapache64
03/07/2021, 1:13 PM
I don't knw what the best practice here. but I use a viewModel for each screen. here's an example:
https://github.com/theapache64/stackzy/blob/master/src/main/kotlin/com/theapache64/stackzy/ui/feature/splash/SplashViewModel.kt
👍 1
4
Views
Open in Slack
Previous
Next