*In Compose navigation h*ow can I go back to the p...
# compose
j
*In Compose navigation h*ow can I go back to the previous destination without making it recompose? I have screen A which launches B, B pops up & provides some data back to A. When B goes to A again I don’t want A to be recomposed. Is it possible?
s
1. No I don't think that is possible 2. If you somehow rely on recomposing or not this feels like there's a problem somewhere else. Could you explain why you don't want to recompose?
☝🏻 1
j
to avoid making network call again
Screen A makes a network call in LaunchedEffect(Unit)
s
When you go back do you get the same instance of your ViewModel? Maybe this network call should live there instead?
👆 1
j
yeh something like this I’ll have to do
s
If you are using compose navigation, you must use viewmodels
2