I'm having trouble understanding exactly how `reme...
# compose
s
I'm having trouble understanding exactly how
remember
works in a particular situation.
NavigationContainer
changes style based on screen width which is stored in a composition local value, and the value of
index
is remember separately for each width, but I want it to be the same for all of them.
Copy code
NavigationContainer {
    var index by remember { mutableStateOf(0) }
    TabRow(...)
}
a
s
Thank you so much! That's exactly what I was looking for.