https://kotlinlang.org logo
#compose
Title
# compose
z

zoha131

10/05/2020, 12:02 PM
If a parent compose collect a
Flow
from
ViewModel
as
state
and it’s multiple children also collect the same flow as state then would it hamper the performance? I have TextFields in different layer. So passing state would make the code messy. Thats why wanted to collect the same flow from multiple Composables.
z

Zach Klippenstein (he/him) [MOD]

10/05/2020, 2:52 PM
The best thing to do, as always with questions of performance, is write the code that is most expressive, readable, and maintainable, and then if you suspect there are performance issues, measure/profile and optimize based on that.
z

zoha131

10/05/2020, 4:42 PM
@Zach Klippenstein (he/him) [MOD] thanks. i will try that.
2 Views