I was very intrigued by the title:
Things nobody will tell you about React.js
Immediately had high hopes that someone is going to try and give a well researched, novel critique that maybe can spur out some constructive conversation.
And then, sadly, the author goes on to write exactly what countless other articles have already covered and discussed to the death for years now. "HTML in JS", "JSX is bad", "Redux is complicated", "The tooling is too much". And then here we are again in the front page of HN for some reason.
To me, this is, again, an extremely common case of "trying to learn everything at once".
Still, a couple of points I'd like to try to mention:
JSX: Has been argued about so much it's pretty much useless to try and add anything to this discussion at this point honestly. For whomever likes it, fine, for those who don't, thankfully the JavaScript ecosystem provides with a multitude of alternatives. For new-comers still trying to reason about it, this talk by Pete Hunt is a good start https://www.youtube.com/watch?v=x7cQ3mrcKaY
Redux:
> Anytime I work with redux I need to go back to its documentation because its core concepts are so complicate that my mind struggles retrieving them back puking them out as soon as I stop working with it.
While I agree that working with Redux at scale can be complicated, the core concepts are extremely simple: Async Action -> Action -> Reducer -> Connect data to your components -> Display -> Async Action -> enter an extremely simple data flow paradigm (flux).
(state, action) => state
Redux can get complicated when you add to the mix schemas, normalization, selectors et al. My advice and I can't stress this enough: Don't try and learn everything at once, start with simple core concepts, iterate later, add tiny new pieces when it makes sense. You don't always need Redux anyway.
RE: Redux boilerplate: It's a lot, yes, but that's by design. Redux is simply a tradeoff between boilerplate and repetitive, dead simple management of your complicated state. I'd rather write a few lines of code more if it means I'd avoid having logic bugs or getting confused where my data comes from.
RE: React Router:
[...] the maintainers had the great idea of bumping 3 major versions in 5 months completely not backward compatible to each other
This is simply not true. React Router has had a single major breaking API change in 2 years. RR 2 and 3 where the same thing and 4 has just now been released after 2 years of stability.
RE: Final complaints:
[...] you must use className instead of class to define the DOM css classes
This is an extremely weak point to complain about.
[...] you will need to import in your scripts react-dom and react without never using the last one instance for some wild reason known only by the React team
You only need react-dom once, to the point where you ReactDOM.render your application. You need React because you're using it implicitly with JSX. I'm not on the React team by the way, it's a simple google search: http://stackoverflow.com/questions/38206646/do-we-need-to-im...
[...] you can render functional components just by using js functions but you will need to wrap all your markup always in a wrapper tag to properly allow the Virtual DOM creation
Valid point, although it's a nitpick. In any case, this is going away with the newer version of React's reconciler (Fiber).
[...] its apparent simplicity is hidden behind a whole toolchain you need to configure before you can even writing 1 line of code
create-react-app is great, officially supported, and does everything, is it the fault of the ecosystem that the author is reluctant to try the official CLI?
https://github.com/facebookincubator/create-react-app