Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue3 mounted

<script setup lang="ts">
  onMounted(() => {
    console.log('component mounted');
  });
</script>

//OR

<script lang="ts">
import {defineComponent, onMounted} from 'vue';
export default defineComponent({
  onMounted(() => {
    console.log('component mounted');
  });
});
</script>
Source by vuejs.org #
 
PREVIOUS NEXT
Tagged: #mounted
ADD COMMENT
Topic
Name
8+5 =