I have this simple 2 component vue app : (nuxt, composition api and ts)
Parent :
<template>
<input type="text" v-model="txt">
<Child :txt="txt"></Child>
</template>
<script lang="ts" setup>
let txt = ref("")
</script>
Child :
<template>
<p>{{ txt }}</p>
<p>{{ txt + " 1" }}</p>
<p>{{ txtComputed }}</p>
</template>
<script lang="ts" setup>
const { txt } = defineProps<{
txt: string
}>()
let txtComputed = computed(() => {
return txt + " 1"
})
</script>
I would like the txtComputed to change according to the txt. But it's stuck at the first value (just " 1")
If I have more complex logic than just adding 1, I'd like to not code it in the html.
So why is the computed not working with props ?