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

What if you could have the best of both worlds? What if you could use JSX templates and use standards-based web components? You can.

Here's an example of using a web component in a JSX template (look for zx-listeditor): https://github.com/wisercoder/uibuilder/blob/master/WebCompo...

Here's how the web component is implemented, also using JSX: https://github.com/wisercoder/uibuilder/blob/master/WebCompo...



Not saying that you can't. I'm just explaining why React won and how it was blatantly obvious that it was going to win when it came out (that is, if you were there in the before-times).


Agree with you on that. React was a breath of fresh air compared to what we had in the before-times, such as Angular, Ember and so on. The canonical demo of Ember.js was two-way data binding. React did away with two-way data binding and introduced JSX syntax. This was a major step forward. Code suddenly looked sane and readable. Then they took two steps backward when they introduced hooks. Code went back to being unreadable.


Also, the entire OP article is demonstrating this... I'm not sure many of the comments here actually read it...




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

Search: