DEV Community

Discussion on: Really, why React?

hamishwhc profile image

I agree that React has many issues. You've done a good job of pointing them out. But I have to ask you why you think React trying to improve itself is a bad thing. Yes, React has several ways to manage state and component lifecycle. The old ones had problems, and yes you'll have to learn about the new ones, but surely it's better to have them than be stuck on the old version? Especially with your concerns of legacy messes, these new capabilities allow developers to write new code and slowly convert the legacy code as needed. For new projects, you can just avoid the old techniques.

On compilation: I've never worked with Vue or Riot myself, so forgive me if I'm wrong, but my understanding is that Vue works with .vue files and Riot works by defining web components like in your example in the Styles section of your article (Checking the Riot docs, a compilation step is needed. It can be done in the browser, but that's a dev tool and not good for production.). Both of these require preprocessing. You can't act as though React is intolerable in this aspect if you use the same.

On your bonus strict mode point... you do know JS has a strict mode right? :P

jfbrennan profile image
Jordan Brennan Author • Edited on

I respect that they're trying to improve it, definitely a good thing. What's happened though is new "better" solutions are layered on the old "better" solutions which are layered on older solutions. You eventually have to admit the original was kinda gross and no amount of band-aids are going to hide all the warts. The need for introducing StrictMode is a clear indication of the situation.

But honestly, I take what I just said back. Fb has invested millions into building and marketing React. The image and social credit has been valued more than React itself. If that wasn't true, they would have cut a major breaking version and abandoned all the dumb stuff, including JSX (interesting thread about that). Idk, but my guess is the core engineers would have loved to trim React down, clean it up, and modernize it (HTML, custom events, Web Components...Hello?!), but the product and engineering leadership wouldn't allow it because they were afraid React's fame and glamour would take a big hit.