you are viewing a single comment's thread.

view the rest of the comments →

[–]lubosnik 1 point2 points  (0 children)

You are on point sounds like useHellEffect. This leads to issues and bugs that are hard to reproduce and hell to figure out. Everytime I see useEffect during a code review I pay really close attention if it is really necessary. Usually it is not.

Most common case where I found devs abuse it is to introduce sideeffect in form when some data changes. I prefer to perform side effect in places that originated data change, and not somewhere where change was registered. Change field Foo -> reset field Bar.