React

React is great. It’s nice and easy to use!

That’s what the back of the box says and it’s true up to a point. The problem is that React itself doesn’t actually solve any real problem. It’s not a framework. It’s just a library. If all you need is a component based ViewModel then off you go. But it’s not. To solve any problems that aren’t trivial you’ll have to build some ridiculous stack of React, some sort of router, the absurd state pattern that is Redux, whatever the hell Flux is supposed to be… You even need a special package to integrate React with Redux. Like there’s any other usecase. You’ll have to tie that in with some kind of Babel Webpack sandwich if you want to put on your big boy pants and do this in ES6.

Before you know it you’ve fulfilled that old statement: “If you don’t choose a framework, you’ll end up building one.” Now you have to maintain a build pipeline, as well as an increasingly complex API as all the functionality you’ve stacked teetering on top of itself just hopefully all keeps working together. It seems to appeal to the NIH Syndrome developer who really wants “control” that extends through micro managing a complex build system. And just hoping that any open source library with the features you need happens to support whatever module format you ended up with.

That’s not to say React itself is flawless either. Growing up as a young programmer I learned a few pretty basic rules. One is don’t forget to put a WHERE clause when manually updating a client’s product SQL table just before deploying it. The more relevant one is “don’t put markup from your methods”. React plainly violates that, and supporters blithely say “Ohhh, the old rules just don’t apply to React!”. Yeah. They do. Separation of concerns and code quality actually do matter. Testability matters. Code completion and syntax highlighting matter.

The typical response of React users is to say that because React’s specific domain is the view, this isn’t Separation of Concerns, it’s “separation of technologies” and doesn’t count. This is merely a highly specific definition of the necessarily vague term concern, and not an actual response. The technologies are the implementation of the concern. Dumping a load of HTML in your javascript functions should make you feel dirty.

React’s attitude of just wiring everything up and wrapping it in enough duct tape that it works isn’t necessarily particularly disciplined and professional. JSX is one of the single worst things that has ever been done by any JavaScript framework, and anyone who uses it should feel the stinging disappointment their family has for them.

Of course, only one of these frameworks has a license that means your right to use the framework can be taken away if there is a patent or legal issue. The original wording basically said Facebook could revoke your license if they don’t like your hair but it’s been clarified now to specify when exactly they can revoke it. Revoke your license. Just ban you from using React. Many React supporters will happily tell you that it’s ok, that’s not going to happen. But “don’t worry it’s fine they’d never do that” has about the same legal standing as “Finders Keepers Losers Weepers”, or “Am I being detained”.

React at one point in its life was a breakthrough. It was for some time by far the fastest framework. Or library. Or whatever. It pioneered the Virtual DOM, forcing every other framework to compete. And they did. And they did it better. React isn’t the fastest anymore, libraries like Vue2 and Inferno kick its ass in performance.

In fact, React isn’t even the best React anymore. Preact is a near identical drop-in replacement, using the same API, but greater performance, a much smaller download, and a license that doesn’t need to be signed in the blood of a child.

No one can doubt that major companies are making amazing things with React. But those companies can pay a team of engineers to live on the cutting edge and keep the duct tape in place.