You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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/)
The text was updated successfully, but these errors were encountered:
if I pass a
primitive
state from a parent component to child component and use that state inuseEffect
, 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/)
The text was updated successfully, but these errors were encountered: