DEV Community

Discussion on: Component Lifecycle Methods Explained

Collapse
 
john_papa profile image
John Papa

Good points.

I've also wondered about how people really feel about React hooks. I mean, it is an amazing feature! But does it also cause confusion in the every day developer? Perhaps. Perhaps not.

Thread Thread
 
laurieontech profile image
Laurie

I suspect it's person-specific? For some, the coupling of state and component lifecycle feels natural. For others, they separate the two in their mind.

I think the one challenge of hooks is that they're purposefully more adaptable. They aren't as explicit with where/how they can be used. It's the "enough rope to hang yourself" problem. And in a lot of cases people don't recognize they're missing some of the background effects of those methods.

Thread Thread
 
john_papa profile image
John Papa

you could be right.

often I see post on how to use react hooks, but I bet the posts that show side by side what you would do with life cycle vs a hook, would resonate more. Im sure they exist, I just havent seen those.

Thread Thread
 
laurieontech profile image
Laurie

Stop giving me ideas!