Hacker News new | past | comments | ask | show | jobs | submit login

This is an opinion, so don't take it as fact, but JS frameworks are a mistake. It's better to take the Unix philosophy and build things up from single components that do their one job well, and focus on standards. So an example would be to use Web Components rather than React. React is amazing but it has a limited lifespan (though that lifespan could be long), whereas Web Components, while not as feature rich, are a web standard. The gaps between React and Web Components can be filled in by various libraries, such as Lit HTML. For state management you could just use plain javascript or dip into a particular library like Redux or MobX if your needs get complex.

In any case, once something no longer fits your needs, you can change it out with something else, which is difficult if you use something like Angular or React or Vue.




I don't know... not all web standards worked well in the past: xhtml, appcache, etc. I wouldn't be surprised if web components never got success. Why should anyone use this standard when a library is 10 times better? Being the standard is not enough.


You're just assumming the library is 10x better.

One reason to use web components would be it allows for a much more lightweight abstraction over DOM.


(HTML) DOM is performant, snappy, and cross browser compatible as never before. One of the reasons why jQuery is becoming irrelevant is that DOM finally works.


But when you need to polyfill an entire browser’s worth of functionality, at some point you need to ask if it’s worth the trouble.


Sure, I ignore that, for the sake of an argument. Hopefully webcomponents will be ready soon in evergreen browsers.

You can still compare idea of React and idea of web components, ignoring everything else, and come to some conclusions.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: