Hard
What is wrong with this code?
<script>
import { defineProps, ref } from 'vue'
const {start} = defineProps({start: Number})
let count = ref(start)
function onClick() {
count++
}
</script>
<script>
import { onMounted } from 'vue'
onMounted(() => {
console.log("counter created !")
})
</script>
<template>
<p>
you counted {{count}} times!
</p>
<button @click="onClick">
Count
</button>
</template>
Author: AdrienStatus: PublishedQuestion passed 300 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about vueJS
2
Vue 3 provides default components to override all classic form components with the goal of performance improvement, a pre-generated basic UI, and pre-established data binding.2
How to use v-do in VueJS2
Display the content of a variable in VueJS1
What is the value of the following expression in VueJS? `this.$route.params.id`1
Create a component dynamically in Vue 3