News for hackers. Stuff that matters.
Re:The Useless UseCallback by p1necone on Monday July 28, 2025 @06:11PM (#44716350)
In my experience you're correct yeah - 95% of the time if you use it it should be included in the dependency array, and any edge cases where that's not true you should endeavour to understand and document. There's a 'react-hooks/exhaustive-deps' eslint rule for exactly this purpose.

There are no comments on this comment yet.