It's like beating a dead horse. React is the literal worst of all the modern JavaScript frameworks and yet that's what everybody insists on using. Vue is light years ahead of it (and will be even further ahead when the new Vapor mode is released in 3.6). Svelte is ahead. Solid is ahead. Heck, even Marko is ahead.

Reacts added some poor abstractions over the last decade. Looking at you hooks and effects.

But its far from the worst.

It was the first framework to put together JSX, a functional way of defining components and simplifying state. This was a monumental improvement. As a result they earned mass adoption.

As a result its the framework that now has a community moat that is not going to crumble until someone else can break ground in the way they did.

Sure, some of these could be considered "better" but they're all better due to incremental improvements for Frontend Engineering.

None of which are substantial enough to unseat the king

> React is the literal worst of all the modern JavaScript frameworks and yet that's what everybody insists on using.

That's rather amusing. "Am I wrong? No it's the rest of the world!"

How are these other frameworks so far ahead? I've used a couple of frameworks and React has been the easiest from the big ones to wrap my head around.

I never "learned" react because the "create react app" would literally never install for me in the early days. There were literally so many dependencies I never got it to build as a novice, I tried svelte everything worked and I got to spend that time building.

I can only speak for Svelte, in Svelte 3/4 it was so dead simple that I built my first basic webapp with 0 javascript, css or html experience in 3 days.

By week 2 I was trying out different UI libraries and css frameworks, that part was super rough though, back then lots of compat issues.

Use Vite. It was a misstep by the React team to continue to recommend create-react-app long after it was deprecated, but Vite is what's commonly used today.

I am a react developer. For past few months I am working in vue and I Just dont see any benefits

Thou art living under a rock.

Ironic.

Totally agree.

It can be made better if you write it using non standard patterns - but the community is so dogmatic you'll get laughed out of the room.

All of my personal react projects use the MVC/MVVM architecture and are so much easier to work with

    export class AppViewModel {
      @rx accessor message = new TextField()
    }

    export function App() {
      const vm = useViewModel(AppViewModel)

      return <div>
        <p>{vm.message.value}</p>
        <input 
          onChange={vm.message.fromEvent} 
          value={vm.message.value} />
      <div>
    }
Makes it vue/angular/svelte-like, but unlike Vue/Angular/Svelte, you pick the version of TypeScript, the tools and don't need brittle plugins for your IDE to work with it.

How is a viewmodel better? It's way more skipping around in the codebase to find the parts you actually care about

- Allows you to use async/await and generators (useful for pagination/infinite scroll)

- You can test the view model independently of the rendering logic

- Dramatically reduces the code that lives directly in the component (it's only TSX)

- Allows for better abstractions and state management (services)

- Clear path to leveraging threads in front end applications

- Simple "visual" components (like <Input />, <Button />) don't need view models, just orchestrating components.

In practice, when writing traditional React, I focus too much on rendering cycles and the nuances of managing component state while spending much less time on making the application look good and feel performant/nice to use.

Having a component be pretty much exclusively TSX gives me a clear separation of "view" and "what the view needs" - so I just think of the html structure and css. I tend to create much better looking and nicer applications this way.

> It's way more skipping around in the codebase to find the parts you actually care about

Not really. You cnt+click to an implementation. Say you have "await someApi.getItems()" - you just click and go directly there. Traditional React apps need to thunk with redux or have a bunch of custom hooks that quickly become a source of confusion.

Hi do you have some examples or repos you'd be comfortable with sharing? This looks interesting.

As a Svelte developer working with React at $DAYJOB I must say it is the most horrific kludge of terrible abstractions I’ve ever had to suffer through in my life. The sheer number of hoops you have to jump through to do literally anything is comically absurd, and even the nicest way of doing things is a dumpster fire of bad programming patterns. The worst part is, React devs are blind to just how much of their day is spent solving problems that are created solely by React itself, unrelated to any business logic or actual value.

One day my dream is to delete 75% of the code, sprinkle some svelte into the business logic, and be left with a strictly superior, more performant version of the platform.

I hear you my brother. Days i had to write react were the worst i had to endure

I hate React, but Vue never seemed much better. What is better about it, in your opinion?

no weird rules of hook. automatic dependency tracking. no stale closure gotchas, no running hook 1000 times cause you made a mistake.

Better update performance by default.

definitely better dev tools