Every time I try to retrieve data from the kanye
API, I encounter this error message:
Property "quote" was accessed during render but is not defined on instance.
Below is the code snippet that triggered the error:
<template>
<div>
<i>{{quote}}</i>
<p>Kanye West</p>
</div>
</template>
<script>
import axios from 'axios'
import { ref } from 'vue'
export default {
setup() {
const quote = ref('')
const getQuote = async () => {
const response = await axios.get('https://api.kanye.rest/')
quote.value = response.data.quote
}
getQuote()
`