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

JSX is awesome. And it is optional. React picked js-first approach. Everything inside curly braces is a valid js expression. So you can use more and more vanilla js features and be happy, while some angular-first frameworks forces you to use some strange semantics; They also make you learn new pseudo attributes - ng-if, ng-for, etc. Those are not valid html attributes. And you cant translate that knowledge anywhere else.

With react you just need to remember to pass className instead of class and sometimes to pass key prop and you are good to go. Overhead is minimal. Since jsx is optional, you can write <Component value={1} />, {Component({ value: 1 })} or createElement(Component, { value: 1 }), which gives you so much control.



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

Search: