Hey I have a question about compose, if I have a c...
# compose
m
Hey I have a question about compose, if I have a complex screen with many states, like • Some permissions need to be granted to show any UI • UI loading • UI error • etc What is the best practise? Like defining a master state data class (with many constructor arguments) and pass it from top to bottom, where I pass the events from bottom to top? I read that passing viewModel it self as method argument in composable is not a good practise since this would imply states within the composable method
d
This could be a
sealed class/interface
or you could have a “status”
enum
as part of your state.
But this question is not Compose or Kotlin related so I imagine somebody is going to point that out soon.
They might say something like “architecture is beyond the scope of this channel.”
m
Hey, thanks for your answer. Where else could I ask this question then?
d
I suggest doing more research related to State management.