top | item 45526975

(no title)

Alex-C137 | 4 months ago

Hard disagree. React is only popular because large companies made it so. There are few things that React is inherently better than Vue and none of them are its bundle footprint, page load speeds, nor the average time to learn one or the other.

Subjectively I am extremely in opposition to the fact that XML anything with composable functions is more intuitive than HTML templates by any stretch of the imagination.

discuss

order

gloosx|4 months ago

I get your point, but to me it is about composition, not popularity. Writing UI as pure functions of state feels far more natural — recursion, higher-order patterns, dynamic layouts, all come easily because React is just JavaScript. In Vue or Svelte, recursion and logic feel bolted onto an HTML templating layer, which makes complex patterns less fluid.

recursive|4 months ago

> Writing UI as pure functions of state feels far more natural

That makes sense, but that's not what react does. Components are functions of their "prop"s. The rest of the state comes from a memoized cache in a fiber. Which fiber? That's determined from a reconciliation algorithm. Does it do the right thing? Usually.

You can tell if it's "a function of state" by whether the state is in the parameter list.

jakubmazanec|4 months ago

> React is only popular because large companies

Hard disagree. React became popular because it was much better than its predecessors like Backbone, and also better than its contemporaries like the first Angular. I was still learning JavaScript, when I was doing a browser app for my thesis, and I used Backbone as a framework. Awful experience, using React was much more intuitive. While Backbone was imperative, React was declarative, with composable components, no custom HTML template syntax. Using React made web development fun for me.

> extremely in opposition to the fact that XML anything with composable functions is more intuitive than HTML templates

And I hate HTML templates. I think there are just two groups with different preferences and therefore it's somewhat useless to argue about this stuff.

Alex-C137|4 months ago

None of this refutes that fact that it was created and pushed by Meta nor explains why it remains popular when there are "better" alternatives by nearly any objective measurement. HTML template frameworks have gotten significantly better since your thesis over ten years ago, Vue.js being the primary one that quickly followed React less than a year after it came out. I also used backbone and knockout.js professionally and, while I agree I definitely prefer React over those, it doesn't explain why React remains popular.

I like to argue about it because I like knowing why people think the way they do about React. I'm a long-time React hater and still look for ways to change my mind, so there's a point for me I guess?