for a route was being recomposed whenever the state inside my HiltViewModel changed. After thinking through it a bit I think I know the answer but wanted some confirmation before updating the post. I’ll put what I think is going on in the thread.
Jesse Hill
06/11/2021, 7:45 PM
So I think that the reason the
composable
is being recomposed is because when I put a
mutableStateOf
value in the ViewModel that is basically the same thing as if I structured the
Am I right to assume that anytime there is a state value either directly in the composable (or in a ViewModel being injected into the composable) that the composable containing the value with recompose if the state value changes?