Part of the zustand package: install zustand and import these from zustand/shallow.
Functions
shallow
tsfunction shallow<T>(valueA: T, valueB: T): boolean
useShallow
tsfunction useShallow<S, U>(selector: (state: S) => U): (state: S) => U
Was this page helpful?