What's the purpose of "const isLoggedIn = props.isLoggedIn;" as in react QUICK START/Conditional Rendering doc?
<p>In the react <a href="https://facebook.github.io/react/docs/conditional-rendering.html" rel="nofollow noreferrer">Conditional Rendering</a> doc:</p>

<pre><code>function Greeting(props) {
  const isLoggedIn = props.isLoggedIn;
  if (isLoggedIn) {
    return &lt;UserGreeting /&gt;;
  }
  return &lt;GuestGreeting /&gt;;
}
</code></pre>

<p>What's the purpose of using <code>const isLoggedIn = props.isLoggedIn;</code> and <code>isLoggedIn</code> instead of using <code>props.isLoggedIn</code> directly?
And why const?</p>