use-shallow-effect
useEffect drop in replacement with dependencies shallow comparison
Import
Source
Docs
Package
Usage
use-shallow-effect
works exactly like useEffect
, but performs shallow dependencies comparison instead of referential comparison:
Hook works with primitive values, arrays and objects: