`useDeepCompareEffect` should not show the warning when the values are not primitive but `null`/`undefined` at the moment
Author: italodeandraCreated Nov 14, 2021Updated Jan 18, 2026
I have this code that uses useDeepCompareEffect and when I have on the deps a value that is not a primitive value but at the moment it is null or undefined, it shows the following message:
`useDeepCompareEffect` should not be used with dependencies that are all primitive values. Use React.useEffect instead.In my opinion this message should be removed for null and undefined values.
Source: streamich/react-use