Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can get around it with a Babel transform:

https://www.npmjs.com/package/jsx-control-statements

Disclosure: self-promotion. It's really frustrating that I see this React-is-crap-because-no-conditionals come up again and again but if you want them all it takes is an npm install and a line of babel config :(.



The article doesn't bash react, but it does say that Vue's ability to use conditionals is superior.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: