I have defined a SFC similar to the one below
<script setup>
const msg = 'Hello World!'
const props = defineProps({....})
.....
function onMounted() {
console.log('the component is now mounted')
}
</script>
<template>
<p>{{ msg }}</p>
</template>
The onMounted function is not executing at all.
I wasn't able to find anything in the Vue documentation. Is it even possible to declare lifecycle hooks like this?