title: mutableStateOf updating in view model but no effect in @Compose
body: <p>I do have a mutableStateof in my HiltViewModel named loading. I am updating the value of loading from a function in the view model which is being passed to @composable function and being used there.
  The case is that the loading value is updating perfectly in the viewModel but not reflecting in the @Composable function.
  My viewModel is:</p>
  <pre><code>@HiltViewModel
  class AuthenticationViewModel @Inject constructor(
      private val repository: AppRepository,
      application: Application
  ): ViewModel() {
     val loading = mutableStateOf(false)
  
     fun update() = viewModelScope.launch {
        loading.value = true
     }
  }
  </code></pre>
  <p>loading value is updated here but not reflecting in the @composable</p>
  <pre><code>@Composable
  fun LoginScreen(
      viewModel: AuthenticationViewModel,
      actions: MainActions
  ) {
      val loading = viewModel.loading.value
  
      //Loading is another composable function where bool value is passed
      Loading(state = loading)
      CustomNavigationButton(title = &quot;Sign In&quot;,enabled = true,onClick = 
      {viewModel.update()})
  }
  </code></pre>
  <p>Now when I click on the navigation button the view model function is being called and the loading state is also being updated but not reflected back in the @Composable</p>
  <p>Loading Composable is:</p>
  <pre><code>@Composable
  fun Loading(state:Boolean) {
      var showDialog by remember { mutableStateOf(state) }
  
      if(showDialog){
          Dialog(onDismissRequest = { showDialog = false }, DialogProperties(
              dismissOnBackPress = false,dismissOnClickOutside = false
          )) {
              Box(
                  modifier = Modifier.size(100.dp).background(Color.White, shape = RoundedCornerShape(8.dp)),
                  contentAlignment= Alignment.Center,
              ){
                  CircularProgressIndicator()
              }
          }
      }
  }
  </code></pre>