6 ms·
The web really needs native templating, reactivity, and data binding. I can't even begin to imagine how much CPU and bandwidth is wasted with billions of users
by pier25 1y ago
The web really needs native templating, reactivity, and data binding.
I can't even begin to imagine how much CPU and bandwidth is wasted with billions of users downloading, parsing, and executing something like React.
- nwienert 1y agoReact isn’t templating though.
- n2h4 1y ago[dead]
- ASalazarMX 1y agoRespect for focusing on semantics but not contesting the CPU and bandwidth waste. That takes honesty.
- ivape 1y agoThat's kind of like saying React isn't just a bunch of a functions (it is). What do the JSX templates compile down to?
- nwienert 1y agoMissed this but - there’s a very meaningful difference between templates and React at least how most people think of templates. React lets you return dynamic tree structures and insert code anywhere inline in that structure. Most templates explicitly don’t allow that for good reason. Further, most but not all templating frameworks have special syntax for conditional logic and loops. If JSX is templating then templating has no meaning. Would createElement() be a template? In that case all functional programming is.
- strix_varius 1y agoWith the TC39 signals proposal, part of that is making progress.
- CharlieDigital 1y agoExcept React.....
- tacticus 1y agoWas react ever about progress?
- nine_k 1y agoIf you valued your sanity when developing complex Web UIs, React was a lifesaver. DOM sucks though, it's slow, it's heavyweight, it lacks transactions. We're stuck with it, and frameworks like React have to do the DOM diffing + patching thing, explicitly, in JS.
- youngtaff 1y agoReact was a solution to a ten years ago problem
- youngtaff 1y agoYou can downvote it but it doesn’t make it any less true Alex Russell has written swathes of arguments about Reacts performance issues https://infrequently.org/2024/11/if-not-react-then-what/ https://infrequently.org/2024/11/if-not-react-then-what/ The DOM has become much faster since React started over a decade ago, the VDOM really isn’t needed anymore even for app like experiences React is about developer preference over user experience
- ch_sm 1y agoAgree that react isn’t the best implementation of the concept, both in terms of ergonomics and efficiency. But a react-like framework is still very much needed to create complex apps in the browser. So IMHO react is a solution to a very current problem, only not an ideal one.
- hyfgfh 1y agoThat's alright now LLM and crypto make this waste seem minuscule
- ivape 1y agoTwo way data binding and a jsx clone is kind of all anyone really needs.