dIn</code> is true this time, the application would render the <code>Home</code> component.</p>
<p>For the sake of simplicity, in the example above, the user&#39;s logged in status is kept in a global variable, and that flag is merely toggled when the user clicks the login button. In a real life application, a user would obviously have to supply proper login credentials, and clicking the login button would trigger a request to a server to authenticate the user:</p>
<pre><code class="language-javascript">var