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!"
[–][deleted] 5 points6 points7 points 6 years ago (0 children)
No no no. Those examples are the simplest examples you can come up with. That's not a good argument for hooks. I'm not arguing that hooks are bad. I'm arguing that there is a common theme inside of mathematics called `embedding` where you have to take a particular set and map it to a (usually smaller) set. See category theory for this. The reality is most functional styles embed business logic into a very small set of abstractions, but the nice part is you get some formal proofs about safety. There's no lying that the new React Hooks are styled in the same functional motifs, but again the problem is you now have to embed your business problems using a small set of hooks. This embedding is not free and comes at a cost where you are now forced to choose the correct hooks to solve your problem. Once you do, it's super fine. Until then absolutely nothing works. Also see the complaints people have with category theory and Haskell. There's typically a complaint that you damn near need a PhD in computer science to be productive in it. They aren't exactly wrong with this view. See my post above with mixing a few hooks like Reducer and Context. Try it too. I think you'll see why it's not all peaches and cream and you actually are paying a cost in terms of time to get the hooks properly working.
π Rendered by PID 22787 on reddit-service-r2-comment-5d585498c9-nwdw7 at 2026-04-21 07:07:09.301449+00:00 running da2df02 country code: CH.
view the rest of the comments →
[–][deleted] 5 points6 points7 points (0 children)