Hacker News new | past | comments | ask | show | jobs | submit login
React Hook recipes every day (usehooks.com)
23 points by aston on Nov 5, 2018 | hide | past | favorite | 6 comments



I admit I’m still totally unconvinced of the value of hooks. This code looks more complex and abstract than the simple class model. Still, it’s good to see some resources!


I can't wait to start using hooks. I think the main power of them will be code reusability, like pulling a bunch of hooks into your html and having out of the box drag and drop, animations, etc, all while keeping the code clean and readable.


This is really helpful to convey all the use cases!


Agreed. I couldn't have chosen better examples, either.


Is there any benefit of using hooks with stateless components versus just having a class component?

Can't reusability come via abstract components, instead of hooks?


I think this article does a pretty nice job breaking down the benefits: https://medium.com/@dan_abramov/making-sense-of-react-hooks-...

I was pretty skeptical at first, and perfectly happy with the render props pattern, but after using hooks for a few weeks I'm liking it much better.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: