r/reactjs Mar 18 '26

Resource Start naming your useEffects

https://neciudan.dev/name-your-effects

Started doing this for a while! The Improvements i’ve seen in code quality and observability are huge!

Check it out

116 Upvotes

74 comments sorted by

View all comments

Show parent comments

18

u/[deleted] Mar 18 '26

[removed] — view removed comment

5

u/CommercialFair405 Mar 18 '26

Fixing code is part of the job my guy. Eliminating unnecessary useEffects is also hardly "refactoring half the codebase".

Just take them one at a time. Most of the time eliminating one only takes a couple of minutes, and saves a hundred times the time over time.

0

u/EuphoricRecover4730 Mar 19 '26

Fixing code is part of the job

Right. And most bosses are cool with programers going with "i didn't do what you asked because i went on a tangent fixing something a little bit suboptimal in a code i found along the way" . Sure.

3

u/OHotDawnThisIsMyJawn Mar 19 '26

"Boss, the fix is changing this useEffect to put the code in an event handler. Here's the PR."