Skip to content

useMounted

Category
Last Changed
3月27日11时54分

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

No recent changes

Released under the MIT License.