Most active commenters

    ←back to thread

    218 points mdhb | 19 comments | | HN request time: 0.406s | source | bottom
    1. pier25 ◴[] No.44392178[source]
    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.

    replies(4): >>44392500 #>>44393120 #>>44393371 #>>44400323 #
    2. nwienert ◴[] No.44392500[source]
    React isn’t templating though.
    replies(3): >>44395047 #>>44399021 #>>44400338 #
    3. strix_varius ◴[] No.44393120[source]
    With the TC39 signals proposal, part of that is making progress.
    replies(1): >>44393172 #
    4. CharlieDigital ◴[] No.44393172[source]
    Except React.....
    replies(2): >>44393456 #>>44395794 #
    5. hyfgfh ◴[] No.44393371[source]
    That's alright now LLM and crypto make this waste seem minuscule
    6. tacticus ◴[] No.44393456{3}[source]
    Was react ever about progress?
    replies(1): >>44394351 #
    7. nine_k ◴[] No.44394351{4}[source]
    If 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.

    replies(2): >>44394509 #>>44396318 #
    8. youngtaff ◴[] No.44394509{5}[source]
    React was a solution to a ten years ago problem
    replies(1): >>44395972 #
    9. agos ◴[] No.44395794{3}[source]
    if (when?) Signals become a standard, React will be in a tight corner if they decide to ignore them
    replies(1): >>44397630 #
    10. youngtaff ◴[] No.44395972{6}[source]
    You 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/

    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

    replies(1): >>44396325 #
    11. nchmy ◴[] No.44396318{5}[source]
    Nah.

    https://svelte.dev/blog/virtual-dom-is-pure-overhead

    https://news.ycombinator.com/item?id=43971164

    replies(1): >>44397821 #
    12. ch_sm ◴[] No.44396325{7}[source]
    Agree 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.
    13. WorldMaker ◴[] No.44397630{4}[source]
    Not really? `useSignal` is just another hook React needs as a replacement/augment for `useState` and maybe `useEffect`. Signals aren't that special. Arguably that's part of why a lot of people like Signals as a proposal.

    (I'm still of the sort that thinks Signals are just worse Observables, so it's not a proposal I'm particularly thrilled about, but were it to be adopted Signals are easy to use in Observable contexts as well, they are just uglier half-implemented BehaviorSubjects, though maybe with a few extra lint rules to prefer Observable behaviors over Signal ones.)

    14. nine_k ◴[] No.44397821{6}[source]
    React appeared in 2013, Svelte, in 2016. Three years is a lot. What comes next can see and avoid some pitfalls of earlier designs.
    replies(1): >>44399766 #
    15. ASalazarMX ◴[] No.44399021[source]
    Respect for focusing on semantics but not contesting the CPU and bandwidth waste. That takes honesty.
    16. nchmy ◴[] No.44399766{7}[source]
    1. I'm referring to the comment that the DOM is slow/bad. It is not. Moreover, VDOM is ON TOP OF the DOM.

    2. We're currently living in 2025. React (and SPAs) is not even slightly necessary.

    17. ivape ◴[] No.44400323[source]
    Two way data binding and a jsx clone is kind of all anyone really needs.
    18. ivape ◴[] No.44400338[source]
    That's kind of like saying React isn't just a bunch of a functions (it is). What do the JSX templates compile down to?
    replies(1): >>44465949 #
    19. nwienert ◴[] No.44465949{3}[source]
    Missed 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.