DEV Community

Brian Duggan
Brian Duggan

Posted on

Micro-Lesson: Shiny Object Syndrome and the Law of the Instrument

This is my first post, and I don't consider myself the most eloquent writer. So pardon any errors.

Recently I have started diving into React Hooks, and as such I have tried to find any and all excuse to introduce them in my code. They're the hot new thing in state management, right? I mean if you're not managing state with hooks......what are you even doing with your life?

And I wound up running into increasingly subtle edge-cases that were resolved by me simply removing the hooks and simplifying any logic I needed in a given component.

While hooks are nice and have their place, they, like every other hot new function, library, design pattern, language, are not a panacea.

"If all you have is a react hook, every problem looks like it can be solved with state management."

P.S. If you're in the Pittsburgh PA area and looking for a job, Idelic is hiring! https://idelic.com/careers/

Top comments (0)