r/reactjs • u/Meow_man1213 • Apr 30 '26
Discussion Finally realized how much i was abusing useEffect, and deleting them is the best feeling ever..
[removed]
289
Upvotes
r/reactjs • u/Meow_man1213 • Apr 30 '26
[removed]
View all comments
Show parent comment
2
u/michaelfrieze Apr 30 '26
Also, your useEffect rules are not enough: https://github.com/andyjessop/starter/blob/main/.agents/rules/frontend.md
You should add this URL in there or at least copy most of this from the react docs: https://react.dev/learn/you-might-not-need-an-effect
Another thing really helpful for hooks in general is this ESLint plugin. It doesn't help much with useEffect spam, but I find it helps LLMs a lot with hooks. https://react.dev/reference/eslint-plugin-react-hooks