@yesstudio/nuxt-composables
    Preparing search index...

    Function useMounted

    • Tracks the mounted state of a component.

      Returns Readonly<Ref<boolean>>

      A readonly reference that is false initially and true after the component is mounted.

      const mounted = useMounted()

      watchEffect(() => {
      if (mounted.value) {
      console.log('Component mounted')
      }
      })