title: Handling back press in Jetpack Compose
body: <p>I have a <code>Composable</code> which has different <strong>views</strong> <em>(see the code for better understanding)</em><br>
  When user clicks on the button it navigates to different <strong>view</strong> but when user press the back button it navigates to previous <strong>screen</strong> but I want to navigate to pervious <strong>view</strong><br>
  Something like on Back press <code>viewState</code> changes it's value<br>
  <strong>Note: I don't found nice explanation than this</strong></p>
  <pre><code>var viewState by remember { mutableStateOf(0) }
      Column {
          when (viewState) {
              0 -&gt; { Button(onClick = { viewState = 1 }) { Text(text = &quot;Goto 1&quot;) } }
              1 -&gt; { Button(onClick = { viewState = 2 }) { Text(text = &quot;Goto 2&quot;) } }
              2 -&gt; { Button(onClick = { viewState = 3 }) { Text(text = &quot;Goto 3&quot;) } }
              3 -&gt; { Button(onClick = { viewState = 4 }) { Text(text = &quot;Goto 0&quot;) } }
          }
      }
  </code></pre>