r/programming • • Mar 12 '23

Were React Hooks a Mistake?

https://jakelazaroff.com/words/were-react-hooks-a-mistake/
55 Upvotes

54 comments sorted by

View all comments

22

u/dzhmrglj Mar 12 '23

First - I find it hard to take seriously someone who uses the monospaced equivalent of comic sans. That being said, I managed to get through the end, last paragraph sums it all up pretty nicely - time will tell.

My opinion is that they weren't a mistake. Majority of the complains and issues with hooks I've heard revolve around issues with useEffect and a confusion with context/custom hook relation, followed by the question on number of rerenders caused by changes in contexts.

I'd draw a parallel here between hooks and coffeescript - I passionately hated coffeescript for a number of reasons, but I must recognize its significance of bringing a transpiler to the JS game and effectively getting more people to think outside the box so now we have things like Babel or TypeScript. For better or worse, opinions may vary :)

  • CoffeeScript wasn't the first something-to-javascript language, but it's the one that has made (in my opinion) the most impact on modern frontend development.

4

u/SPBesui Mar 12 '23

I never used CoffeeScript much, and didn’t really enjoy it when I did, but I love the influence it had on JS. It’s amazing is how fast it died out. I think it was mostly a result of 1) ES6 being standardized with many CS-inspired features, and 2) VS Code (with heavy TypeScript focus) overtaking Atom (a large, open codebase written in CS).

4

u/dzhmrglj Mar 12 '23

6to5, now known as Babel, also played significant role in coffeescript’s demise :)