UNPKG

@mantine/hooks

Version:

A collection of 50+ hooks for state and UI management

1 lines 438 B
{"version":3,"file":"use-mounted.mjs","names":[],"sources":["../../src/use-mounted/use-mounted.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nexport function useMounted() {\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n return mounted;\n}\n"],"mappings":";;;AAEA,SAAgB,aAAa;CAC3B,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,gBAAgB,WAAW,IAAI,GAAG,CAAC,CAAC;CACpC,OAAO;AACT"}