framer-motion
Version:
A simple and powerful JavaScript animation library
1 lines • 566 B
Source Map (JSON)
{"version":3,"file":"use-is-mounted.mjs","sources":["../../../src/utils/use-is-mounted.ts"],"sourcesContent":["\"use client\"\n\nimport { useRef } from \"react\"\nimport { useIsomorphicLayoutEffect } from \"./use-isomorphic-effect\"\n\nexport function useIsMounted() {\n const isMounted = useRef(false)\n useIsomorphicLayoutEffect(() => {\n isMounted.current = true\n\n return () => {\n isMounted.current = false\n }\n }, [])\n\n return isMounted\n}\n"],"names":[],"mappings":";;;;;AAMI;;AAEI;AAEA;AACI;AACJ;;AAGJ;AACJ;;"}