1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-03 18:26:38 -04:00

Migrate to app router (#2254)

This commit is contained in:
2025-02-07 11:33:38 -05:00
committed by GitHub
parent e97613dda5
commit 8aabb4a66f
179 changed files with 4095 additions and 4951 deletions

View File

@ -1,15 +0,0 @@
import { useEffect } from "react";
import useFirstMountState from "./useFirstMountState";
// identical to `useEffect()` but ignores the first invocation
const useUpdateEffect: typeof useEffect = (effect, deps) => {
const isFirstMount = useFirstMountState();
useEffect(() => {
if (!isFirstMount) {
return effect();
}
}, deps); // eslint-disable-line react-hooks/exhaustive-deps
};
export default useUpdateEffect;