Trust me, I wish we could move one from React for something more reasonable like Solid or Svelte, but no amount of benchmark will change the trend.
Feels like Twitter is living in a parallel universe.
Svelte has to recreate plugins for all of these things and more. I haven't yet tried Svelte (I'm waiting for Svelte 5), but the tooling needs to be at least comparable to Vue's if I'm going to consider adopting it.
This has never been true. Nobody adopts React in 2023 because it's the fastest (as in performance) option. Other frameworks have been far faster for the better part of a decade. Why would shaving a handful of milliseconds here and there change the game now?
People choose React because you could have gone from 0.15 to 18.0 with maybe a week of effort, often less. It has escape hatches where they're needed. Almost every tool you could need works with React. There's essentially nothing that you can't accomplish with React as the foundation. Nobody has gotten fired for choosing React.
> People choose React because you could have gone from 0.15 to 18.0 with maybe a week of effort, often less.
That's only if you are not using other libraries, otherwise it will take much more time than that and the upgrade would very likely require you to rewrite your components as functions which will be a massive undertaking, specially for larger codebases which already made extensive use of OOP patterns to keep code modular. It's even worse if you consider that React is unusable for most projects without a lot of associated tooling that also faces breaking changes often (i.e. your build tooling, your CD/CI environment and deploy workflow, etc.).In reality React is anything but stable, it has in 10 years faced multiple paradigm shifts in terms of development experience, had most of its codebase changed or refactored multiple times, etc.
> Nobody has gotten fired for choosing React.
This is an (unfortunately) very true piece of wisdom which I have to agree with.I'd be very surprised if 0.15 to 18.0 could be as seamless as you claim, for a real production application with hundreds of components and a few dozen dependencies
Svelte follows the patterns established by HTML and CSS, and builds upon them. If you know how to write static HTML, you will already be familiar with the structure of a Svelte component. If you know CSS, the <style> tag in Svelte is natural to you (except that CSS styles are scoped to component by default, so it's actually easier than plain CSS).
For the JS, you don't have to research to find out what the hot client state management tool of the week for React is. You don't have to worry about useState vs useEffect vs useMemo. You don't have to worry about how to integrate with a reactive library like rxjs. You just write what looks like plain JS + things like "$:" and "$store", and you're done.
Developer performance is what matters most here. React has an advantage for now due to a decade of inertia, but folks coming up who don't already know React or folks who are feeling burned out by React due to huge transitions like classes-to-functions? They're the target audience who's gonna try Svelte and realize they've been living with Stockholm Syndrome for a while now.
Things like useMemo(…) are abstraction leaks. They are mental overhead and boilerplate over and above the actual problems people are trying to solve.
Gimme someone with HTML/CSS knowledge and basic JavaScript skills, and I'll deliver a viable Svelte developer in a day or two. That's something React cannot match and will never match.
Will React disappear? Of course not. Even COBOL is still in use. No one's dumping React and a large codebase on a whim. But when more folks realize they can use GridJS and ChartJS and other vanilla JS libraries out of the box with Svelte without an elaborate stack of bespoke wrappers to make them work, React's ecosystem will not seem quite so rich in comparison.
Folks writing for greenfield are gonna think twice about React.
Like Bun?
SolidJS has shown what can be done performance-wise without all that nonsense. And Mobx+React/Vue is quite performant.
Also, switching costs are incredibly high.
let features = 0;
let people = 1;
$: featuresPerPerson = features / people;
function addPerson() {
people++;
}
function addFeature() {
features++;
}
Folks might consider it magic, but it's a lot closer to our mental model of the problem than anything SolidJS can give. As for "magic", we're working with sand we shot with lightning to make it think. If you don't like magic, you're in the wrong vocation. The only question is whether or not the magic is useful, predictable, and reliable. I consider Svelte to be that right kind of magic.