/* eslint-disable react-hooks/exhaustive-deps */ import { useEffect, useRef } from 'react'; export const useUpdateEffect: typeof useEffect = (effect, deps) => { const didMountRef = useRef(false); useEffect(() => { if (didMountRef.current) { return effect(); } didMountRef.current = true; }, deps); };