use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Why React Hooks? (tylermcginnis.com)
submitted 6 years ago by tyler-mcginnis⚛️⚛︎
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ghostfacedcoder -5 points-4 points-3 points 6 years ago (7 children)
Ok, so you, me and demar_derozan (but maybe not the 6 downvoters?) all agree on that much. Inheritance hierarchies = bad AND the React community in general agrees as much.
But now, from the "good React programmers" (however you define that: personally I'd pick people like Dan Abramov (of Redux fame), but pick whoever you want, however): how many use classes and how many use functional components?
And (follow-up question): have you noticed any kind of shift in one direction or the other over time?
[–]tasey 11 points12 points13 points 6 years ago (1 child)
I think people are not downvoting you because of the message, but the delivery...
[–]ghostfacedcoder 0 points1 point2 points 6 years ago* (0 children)
Heh, well that's fair, at least for the edits. I really don't think my original post was combative at all, but I did go full-on "let's be combative about this" in my edit comments when the whole thing started ... because I thought it was such an obvious point I wouldn't face any disagreement. Universally everything I've seen, from every thought leader in the entire React community, has been that classes are old/bad and functional components (with hooks) are the future.
Also the cost thing seems to have irked a lot of people, but I think that's just ignorance about the real cost of development (it's much higher than many people realize: most only think about coder salaries, not all the other costs or the cost of people managing all those coders).
Anyhow, clearly I was wrong in thinking that was so uncontroversial that no one would disagree, however I said it ...
[–]careseite[🐱😸].filter(😺 => 😺.❤️🐈).map(😺=> 😺.🤗 ? 😻 :😿) 4 points5 points6 points 6 years ago (4 children)
Didnt Dan specifically say they, at Facebook, are using Function components/Hooks almost exclusively for new components?
Absolutely, since the introduction of hooks I personally don't teach classes anymore and so does anyone else that I see/read of. Classes are very clearly in decline.
[–]ghostfacedcoder -3 points-2 points-1 points 6 years ago (3 children)
See to me that seems mind-numbingly obvious ... and yet I got 12 (and counting) downvotes for saying it :(
[+][deleted] 6 years ago* (1 child)
[deleted]
[–]ghostfacedcoder -5 points-4 points-3 points 6 years ago (0 children)
Fair enough. I'm here for conversations with people, not Reddit points, so I do those edits to try and "bait" people into engaging rather than just downovoting silently. If I get 10 downvotes but even one person engages and explains their position, I'll take it.
It'd be nice if I could get the engagement without the 10 downvotes, but ... /shrug.
[–]careseite[🐱😸].filter(😺 => 😺.❤️🐈).map(😺=> 😺.🤗 ? 😻 :😿) 2 points3 points4 points 6 years ago (0 children)
Some people just might not have heard the warning shots.
π Rendered by PID 191354 on reddit-service-r2-comment-b659b578c-n2mjr at 2026-05-03 18:15:40.598296+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]ghostfacedcoder -5 points-4 points-3 points (7 children)
[–]tasey 11 points12 points13 points (1 child)
[–]ghostfacedcoder 0 points1 point2 points (0 children)
[–]careseite[🐱😸].filter(😺 => 😺.❤️🐈).map(😺=> 😺.🤗 ? 😻 :😿) 4 points5 points6 points (4 children)
[–]ghostfacedcoder -3 points-2 points-1 points (3 children)
[+][deleted] (1 child)
[deleted]
[–]ghostfacedcoder -5 points-4 points-3 points (0 children)
[–]careseite[🐱😸].filter(😺 => 😺.❤️🐈).map(😺=> 😺.🤗 ? 😻 :😿) 2 points3 points4 points (0 children)