I've used React, Vue, Svelte and Solid. React is my far my least favourite of the four. Both before and after they added hooks, all the major API calls seem to have been designed for least intuitiveness.
I'm with you on that one, React is by far the least productive of the lot and every single method it exposes to you has so many damned footguns it's fucking incredible, no wonder most people complain about slow React apps.
But to be fair to React, it's not entirely its fault. What it did when it came out really changed the paradigm for the better, without it we wouldn't have had component-based frameworks like Vue or Svelte today. It's just that, because of being backed by Meta, it has also far outlived its usefulness and has since been far surpassed by other frameworks that learned from its mistakes, but unfortunately for whatever reason no other framework has been able to usurp it. Anecdotally at least, I've noticed that there are some pretty large and important Vue codebases out there which makes me happy, so perhaps the tide will slowly start shifting and we'll start seeing the better frameworks win out at the end of the day.
No OP, but I've also used Angular, React, Vue, Solid and Svelte in real world projects and my default choice is Vue, because it's on par with Solid and Svelte (and with Vue Vapor those three are basically the same) but with the larger ecosystem (vuerouter, vueuse, nuxt, nuxt-ui, primevue, nuxt-content, ...). I must also say that React was by far the most unpleasant and unproductive to use.
I keep reading unpleasant without any arguments. React is simple by nature, what made it unpleasant and unproductive?
Granted I mostly do work on Shopify apps, so most of the heavy work has been done for me, I just put components together. This works fine, and I'd rather do this in React than e.g. Angular due to the small scale of the apps. Then again web components would've also been fine.
Perhaps "simple by nature" is not at the top of everyone's mind.
Simple is great until you build something complex, or need to create a large reactive UI that is not a simple CRUD fetcher. Things like non-linear video editors, 3d editors, games, things with a large component tree that takes work to plan, build, and non-trivial to re-arrange thereafter.
Your "simple by nature" framework with one-way binding and render-the-whole-tree-when-something-changes now means you spend more time coding (fighting) React than you do your application logic. You could have focused on improving algorithms, but nah you're stuck architecting hooks, context providers, state management, and adding libraries that cement you deep into the React hole.
I think React developers all secretly want to use Solid but they're stuck using React at work, and just chant React is the best React is the best React is the best
Yeah, it's one of my bugbears that a framework like React is built to solve a niche problem (running an enormously big and complex app like Facebook for an audience where timing is critical), and then gets doled out for everyone, even though most web apps have much lower requirements.
Not ultra experienced with react, but I have shot myself in the foot just because the way react is made compared to other frameworks:
- infinite loop due to re-rendering on the render function (it happens every single time i come back to react)
- using useEffect when not required
- nested object updates (dunno if this is still an issue)
- class vs whatever the name is (className?)
Overall as another comment said I feel more fighting against react pitfalls than focusing on my application's logic. That really takes a toll in productivity as part of your brain loses a small portion of 'RAM'/cognitive load as you need to make an active effort to not shoot yourself in the foot. I guess most people get used to it, but for me it just never clicks knowing there are similarly performant frameworks with way more friendly APIs.
> React is simple by nature, what made it unpleasant and unproductive?
It isn't "simply by nature" at all. I have lost so much time battling through the minutiae of the different use...() hooks, trying to figure out either why something never updates, or updates too often, or updates but the state is stale etc etc. I never run into issues like this at all with Vue. Things update simply and predictably for me.
I've stopped being interested in frontend frameworks after Vue/React but I agree. I find JSX with its mix of JS and HTML rather weird. I prefer Vue's abstractions and the readability of its template syntax. It's also rather easy to add it without a compilation step for some interactivity or app-like behaviour on a web page. More complex applications using a bundler work as well as our company is developing and maintaining a 100k LOC webapp too. In the end I'd prefer it if browser would provide a native API for two-way binding, components or templating and maybe state management as well.
I have by far the most experience with Vue, but I'm a bit ambivalent about Vue3, and often still write in a Vue2 style.
Svelte looked pretty nice, but before I had a chance to really proficient, that codebase got re-written in Solid. Solid seemed to have the benefits of React-compatibility without so much brain-hurt.
I really wish something else had won.