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.
The effect runs once, even though the object is new on every render.
const useShallowEffect = (
cb: EffectCallback,
dependencies?: DependencyList,
) => void