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

spierce7

07/23/2022, 5:43 AM
I’ve been trying out Voyager for Compose navigation. One of the interesting pieces is the concept of `Screen`s.
Screen
s use classes, but I haven’t found any way to use the benefits of classes in my Composable functions. Everything is scoped to the Compose lifecycle, i.e. my ScreenModel’s via
rememberScreenModel
, and so instead of being able to share it as a member variable between all my Composable functions, I’m stuck passing it from Compose function to Compose function. It’s very cumbersome. Is there something that I’m overlooking? Is there a better way to do this?
11 Views