0👍
your code error
// App.vue
<script setup lang="ts">
import { onMounted,reactive, toRefs } from 'vue'
const state = reactive({
showNavbar: 'xxxx'
})
const { showNavbar } = toRefs(state)
onMounted(async() => {
console.log('hello world')
})
</script>
<template>
<main>
<RouterView />
</main>
</template>
<style lang="scss" scoped>
</style>
Source:stackexchange.com