3 ms·
You don't need any of it. You can write vanilla JS, using ES6 classes, as web components and be done with the whole front-end framework game. All you need for d
by gabereiser 3y ago
You don't need any of it. You can write vanilla JS, using ES6 classes, as web components and be done with the whole front-end framework game. All you need for data-binding is an Observable of some kind that can loop through listeners for events and call their handler. Component classes all have a render function so that React kids feel at home. Those components are registered using CustomElementRegistry.define [1]. Tools like vite help roll up all that code and styles into a minified bundle but doesn't include all the crap that these "modern" frameworks add. Take this from someone who has been writing web sites since 1996. You don't need any of those frameworks unless you're looking to give away control of your product to the roadmap of the framework or need to hire a bunch of people to accomplish something quickly and all they know is React.
[1] https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define https://developer.mozilla.org/en-US/docs/Web/API/CustomEleme...
- johnnyanmac 3y agoI'm assuming that someone who "took over a React project" isn't trying to remove all the react from the project. They did mention they found both up and downsides compared to their old work.
- chasd00 3y agosomeone should write up some documentation for the standard APIs and how to use them but then give the website a name. People would think of it as the next amazing and shiny JS framework but, in reality, it's no framework at all just a name. That would be good medicine for the front-end dev community.
- deleted 3y ago[deleted]
- text0404 3y agoer, so is the advice here to write your own framework instead of using a framework? because writing and maintaining your own framework is not a trivial exercise and is a massive project on its own, which is why a lot of people reach for a framework in the first place...
- troupo 3y ago> You don't need any of those frameworks unless you're looking to give away control of your product to the roadmap of the framework Have... Have you seen the roadmap for web components? 20 more specs just to barely patch holes in the original design: https://w3c.github.io/webcomponents-cg/2022.html https://w3c.github.io/webcomponents-cg/2022.html
- riversflow 3y agoDidn’t know about this API, very cool! Could you point me toward a repo that implements this style?
- maxsentinel 3y agohttps://angular.io/guide/elements https://angular.io/guide/elements