Join Slack
Powered by
Hi, I'm building a Compose Multiplatform app that ...
# compose
d
dbaelz
05/24/2023, 6:34 PM
Hi, I'm building a Compose Multiplatform app that has a screen with around 12 TextFields. Is there a way to use the states more compacted than 12
rememberSaveable{}
? Any best practice for state handling with that many state properties?
f
Francesc
05/24/2023, 6:46 PM
consider creating a state holder where you define your textfield states
Francesc
05/24/2023, 6:47 PM
you can check this as a guide
https://www.francescvilarino.com/hoisting-state-in-composable-objects
d
dbaelz
05/24/2023, 6:52 PM
Thanks. Totally forgot about the state holder. 🙇
o
Odife K
05/24/2023, 10:58 PM
@Francesc
this is super cool. I've been doing it the hard way all this while 😔 Thanks for sharing
3
Views
Open in Slack
Previous
Next