UNPKG

framer-motion

Version:

An open source and production-ready motion library for React on the web

5 lines (3 loc) • 181 B
import { useEffect, useLayoutEffect } from "react" const isBrowser = typeof window !== "undefined" export const useIsomorphicLayoutEffect = isBrowser ? useLayoutEffect : useEffect