He's not bashing React, he's educating you about an even better way. If you care about frontend development it would be wise to pay attention.
He's not bashing React, he's educating you about an even better way. If you care about frontend development it would be wise to pay attention.
Whether he's brilliant on twitter or not is irrelevant. People are judging the presentation. Even if he's the most brilliant mind in the 21st century, that doesn't shield his work from scrutiny.
I quote him
> React sucks
How do you call it? a constructive criticism ?
He's passionate about this stuff because there is a very simple mathematics to frontend development (both declarative UI and immutable state as a function of mutational events) that has been hiding in academic papers and haskell minds that is now coming to the forefront.
There is a better way, and it can reasoned about much better than other approaches.
view m0 = r0
view (m1 = handler e0 m0) = r1
view (m2 = handler e1 m1) = r2
This is the essence of MVC. Mathematically pure and beautiful.
React and Flux are so close to this conceptually, but fall far short of it in actuality.
View is a function of state. State is an argument to view, and should not be mated to view in any other way except as a function call argument to the view - point free preferably.
If you look at the source code of React, there is an important object called Transaction. Transaction is basically AOP. AOP is not needed in JavaScript! Transaction reinvents functional composition. That is why things like Mercury, Mithrill, and Cycle are better,smaller, easier to read and reason about.
I love React, but it is a gateway to an even brighter future. Rejoice that the days of blind monkeys (myself included) writing UI code is coming to an end.
Do I have some gripes with React's API? Sure. But it's a good start.