Skip to content

useMounted ​

Category
Last Changed
2025-08-01

Mounted state in ref.

Demo ​

unmounted

Usage ​

js
import { useMounted } from 'comuse-core'

const isMounted = useMounted()

Which is essentially a shorthand of:

ts
const isMounted = ref(false)

onMounted(() => {
  isMounted.value = true
})

Source ​

Source • Demo • Docs

Changelog ​

No recent changes

Released under the MIT License.