7 ms·
As a developer with 15 years of JavaScript experience who has recently had to learn React & React hooks: They're fine, but weird. There's a lot to like in Reac
by gregopet 6y ago
As a developer with 15 years of JavaScript experience who has recently had to learn React & React hooks:
They're fine, but weird. There's a lot to like in React, but I constantly wonder whether I've joined a cult. Somebody learned a couple of cute tricks and wants to use them _everywhere_, no matter if they fit the situation or not. Because of this there are a lot of do's and dont's that probably could be avoided with a different design. And there is a lot of gray area in between, specific things the React manual wants me to avoid but in the end I cannot (and I have to quote a whole lot of blog posts from various known React developers to my code reviewer to prove they were really necessary).
Classes have their failings and inexperienced (or overzealous) developers can often turn them into a big mess. These are also well known problems to the computer science community that has come up with a number of ways to manage the mess. Hooks are just a completely React concept where no previous knowledge has any use. Despite looking innocent they have a load of problems and peculiarities, just like classes and methods do. I constantly wonder why they had to go and reinvent the wheel and currently still do not feel like it was worth it.
Learning new things is great and I am glad I got the chance to learn React and its hooks. Now that the project is slowly coming to an end however I am also glad I will soon start learning something else, perhaps something a little less specific to a particular ecosystem.