Skip to content

useMounted

Category
Last Changed
8月1日16时40分

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

SourceDemoDocs

Changelog

v4.1.0 on 8/1/2025
bc8f2 - feat: add useStorage

Released under the MIT License.