Run an effect only when the dependencies change, not on the first render.
This is custom React hooks, you need to follow the Basic Rules when you use it.
The counter of updates ignores the first render.
const useDidUpdate = (
fn: EffectCallback,
dependencies?: DependencyList,
) => void