v1.0.0 (May 29, 2022)
Initial release
- Adds rule
react-hooks-unreliable-deps/reference-deps
& optionavoidObjects
. WhenavoidObjects
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