News for hackers. Stuff that matters.
Re:React, JSX and ES6: The Weird Parts by funkiee on Tuesday August 25, 2015 @10:53AM (#10116919)
More on that point. The reason you cannot use if/else within JSX is because the statement needs to evaluate to an expression. If you really need to use if/else logic embedded, a ternary operator would work just fine.

return ( <nav> <Home /> { loggedIn ? <LogoutButton /> : <LoginButton /> } </nav> );

Re:React, JSX and ES6: The Weird Parts by muzmath on Tuesday August 25, 2015 @03:12PM (#10118828)
I was hoping someone would mention this. Between this and an extended rant about `dangerouslySetHtml`, I would say this author was really scraping hard to find negative things about React. Poor quality article.
Re:React, JSX and ES6: The Weird Parts by meesles on Wednesday August 26, 2015 @10:45AM (#10123221)
I use these a bit and think they're great! If your logic is more complicated than one line it doesn't belong in there.