Using the Vue 3 composition API, how to return the calculated value of the propertyfirstDigit? The keywordthisin the computed property isundefinedbut when I excludethisI 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!
thisis something else in the composition API, try using:firstDigit: computed(() => { return input.fourDigits[0] })