facebook/react — pull request #2076 by whatasunnyday (2014-08-20 18:49:39+00:00)
Title: Add example to if else in JSX.

> whatasunnyday: Quick Q, what is the "react way" of handling something like a login/log out button on a nav bar? My understanding is that JSX with an if statement doesn't work.
> zpao: var b; if (loggedIn) { b = } else { b = } ... return {b}
> whatasunnyday: zpao, thanks!
> zpao: np. you could do it in a ternary in JSX but that's kinda gross
> zpao: if you're interested in making our docs better, that would be great for this page: http://facebook.github.io/react/tips/if-else-in-JSX.html
> whatasunnyday: zpao, i would love to. thanks for that suggestion.
> whatasunnyday: zpao, going to bed first! i'll be sure to add this in the morning.
> zpao: fair enough :) i should do that soon too...