Skip to content

1.0.0

Latest
Compare
Choose a tag to compare
@gnowland gnowland released this 29 May 10:38
· 2 commits to main since this release

v1.0.0 (May 29, 2022)

Initial release

  • Adds rule react-hooks-unreliable-deps/reference-deps & option avoidObjects. When avoidObjects is set ESLint will display a message when an object type is as a React hook dependency.

Example:

244:5   warning   React Hook useEffect has an object in its dependency array: 'query'. 
Non-primitive dependencies can result in triggering the callback unnecessarily due to
referential equality comparison. Consider destructuring the object outside the useEffect
call or using property accessors to refer to primitive values within the dependency array
                react-hooks-unreliable-deps/reference-deps