I'm calling a method from an element like so
<span>Age/Sex: </span> <span>{{ getRunnerAge() }} | {{ runner.sex }}</span>
The method is async & calls off to my actions.js file where a graphQl query is ran
async getRunnerAge () {
const promise = this.getCompetitorAge(this.runner.runnerId)
const response = await promise
console.log('runnerAgeResponse: ', response)
return response
},
The value I get in the console is runnerAgeResponse: 6
In the browser it is displaying [object Promise]
rather than the expected "6"
What can I do to to show this Promise as its value?
Can I use a function here, or this have to be a property on data?