useShallowEffect

Run an effect when the dependencies change, comparing objects and arrays by their contents.

This is custom React hooks, you need to follow the Basic Rules when you use it.

General

The effect runs once, even though the object is new on every render.

APIs

useShallowEffect

const useShallowEffect = (
  cb: EffectCallback,
  dependencies?: DependencyList,
) => void
Edit this page on GitHub