Comment by RussianCow

Comment by RussianCow 11 hours ago

5 replies

This. React was incredibly innovative at a time where the alternatives were some combination of:

* Two-way data binding spaghetti

* Boilerplate-heavy reactivity

* Opaque, framework-specific magic

* Manual state updates/transitions

React didn't win "by default" (whatever that means), it won because it was better than most of the other options at the time.

I agree that, on purely technical grounds, it isn't as strong of a framework as other competitors anymore, but React is and has always been Good Enoughâ„¢ for most companies, to the point that it's not worth reaching for anything else most of the time. And I say this as someone who doesn't like most things about modern React.

andy_ppp 11 hours ago

[flagged]

  • RussianCow 10 hours ago

    React was actually pretty simple in the early days. It's gotten significantly more complex because of hooks, suspense, SSR, and other features they've introduced more recently. But I would still take modern React over AngularJS 1 and I think it's far more explicit.

    • rimunroe 10 hours ago

      The source code for hooks when they were initially released was actually really straightforward too. It's been many years since I've read through other parts of the source code though.

  • AstroBen 10 hours ago

    Yeah, that's where the complexity is supposed to be

  • johnfn 10 hours ago

    All framework code has magic in it. But I posit that React uses magic internally so that we can write magic-free code. It's like how the Rust compiler contains unsafe code.