npx atmx add hook use-isomorphic-layout-effect
Copy and paste the following method into @/utils/helpers/undefined.ts:
@/utils/helpers/undefined.ts
import * as React from "react"; import { isBrowser } from "@/helpers/is-browser.ts"; export const useIsomorphicLayoutEffect = isBrowser()? React.useLayoutEffect: React.useEffect;