Avoid return statements in Jetpack Compose!

<p>It&rsquo;s not the cleanest code, but it works fine in general, and it saves you from dealing with that annoying&nbsp;<code>null</code>&nbsp;initial value for the state variable, right? Well, not so fast!</p> <p>I&rsquo;ve seen cases where code like this can result in that flow never getting new states, so, after that initial return, we never get a proper value to actually draw the screen we want. Even worse, after a configuration change, if anything tries to interact with the&nbsp;<code>navController</code>&nbsp;and that return triggers beforehand, it may lead to a crash, since its&nbsp;<code>navGraph</code>&nbsp;never got set by the&nbsp;<code>NavHost</code>&nbsp;.</p> <p>Now, let&rsquo;s move to a more subtle situation where I had issues with returns:</p> <pre> @Composable</pre> <p><a href="https://medium.com/android-ideas/avoid-return-statements-in-jetpack-compose-9596deb2059f"><strong>Read More</strong></a></p>