Using the Vue 3 composition API, how to return the calculated value of the propertyfirstDigit
? The keywordthis
in the computed property isundefined
but when I excludethis
I get the errorfourDigits is not Defined
.
{{JSON.stringify(input.firstDigit, null, 2)}}
If I need to use a state property to assign a value to another state property, I can do this in the onMounted() hook. like this:
Check if it works for you. wish all the best!
this
is something else in the composition API, try using: