DEV Community

Discussion on: Senior front end dev here, ask me anything!

Collapse
 
quanla profile image
Quan Le

Hi man, your profile is quite similar to mine. How do you think about Hooks? I think it sucks, and the people love it sucks even more. Nice to know you :D

Collapse
 
kendalmintcode profile image
Rob Kendal {{☕}}

Hello there!

I'll be honest, I was a little resistant to Hooks to begin with. But sometimes, when you're perfectly fine and dandy with whatever you're using, it's difficult to justify moving to something new, especially when the perceived benefits of that something new don't outweigh the effort involved to do the move. I was very productive with functional components and class-based ones.

However, I've made the leap after learning a bit more and gradually introducing them and now I love them as they make things much simpler more often than not.

Have a read of Amelia Wattenberger's amazing article on them and see if it changes your mind > wattenberger.com/blog/react-hooks

Collapse
 
quanla profile image
Quan Le • Edited

Thanks man, I just read the other article that you shared, and frankly, it doesn't change my mind. I am stubborn, I know, but her use of Class components is just terrible to begin with, and even if I don't know how to use it better than her, the benefit of Hooks code being shorter won't bribe me to look away from its hacky and dangerous nature. Thanks anyway. It's nice to know you

Thread Thread
 
kendalmintcode profile image
Rob Kendal {{☕}}

You too matey, always nice to make a connection :D

I think that's a great nature of development: what works for one, doesn't for another. And the Facebook team have explicitly said that class things aren't going away because they have literally 1000's of components that depend on them.

So the good news is that you don't have to choose!

Thread Thread
 
quanla profile image
Quan Le

Yeah, and then we have Preact, or Vue or stick with old versions... anything that keeps me away from Hooks. I thought Redux was worst until I saw Hooks.
Anyway, have a good day (or night). Cheers