Login
From:
CodingItWrong.com
(Uncensored)
subscribe
Don’t Sleep on Exhaustive Dependencies | CodingItWrong.com
https://codingitwrong.com/2024/05/30/dont-sleep-on-exhaustive-dependencies.html
links
backlinks
Roast topics
Find topics
Find it!
In React, if you have a useEffect hook that accesses a dependency not listed in the dependencies array, the lint rule react-hooks/exhaustive-deps (assuming you have it enabled) will give the error: