Software dev at Netflix | DC techie | Conference speaker | egghead Instructor | TC39 Educators Committee | Girls Who Code Facilitator | Board game geek | @laurieontech on twitter
Thanks John! I found myself thinking similarly as I put this together. React also has a number of methods for both before and after a lifecycle event, but the recent addition of hooks upends that a bit.
My assumption is that some of the poor usages come from people who don't understand the underlying concept. It's not an easy thing to wrap your head around at first (at least with the people I've seen in the learning stage).
Perhaps the availability of methods is not as much of a problem compared to lack of best practices and comprehension.
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.
Software dev at Netflix | DC techie | Conference speaker | egghead Instructor | TC39 Educators Committee | Girls Who Code Facilitator | Board game geek | @laurieontech on twitter
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.
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.
Software dev at Netflix | DC techie | Conference speaker | egghead Instructor | TC39 Educators Committee | Girls Who Code Facilitator | Board game geek | @laurieontech on twitter
Thanks John! I found myself thinking similarly as I put this together. React also has a number of methods for both before and after a lifecycle event, but the recent addition of hooks upends that a bit.
My assumption is that some of the poor usages come from people who don't understand the underlying concept. It's not an easy thing to wrap your head around at first (at least with the people I've seen in the learning stage).
Perhaps the availability of methods is not as much of a problem compared to lack of best practices and comprehension.
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.
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.
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.
Stop giving me ideas!