Open
Description
if I pass a primitive
state from a parent component to child component and use that state in useEffect
, your eslint rules triggers a false error: React Hook useEffect has an object in its dependency array: 'hover'. 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.eslint[react-hooks-unreliable-deps/reference-deps](https://www.benmvp.com/blog/object-array-dependencies-react-useEffect-hook/)
Metadata
Metadata
Assignees
Labels
No labels