Untitled
unknown
javascript
a month ago
265 B
4
Indexable
Never
// In a Vue method async fetchBitcoinPrice() { const response = await this.callBitcoinAPI(); this.bitcoinPrice = response.data.bitcoin.usd; }, // A separated method for the API call keeps things neat async callBitcoinAPI() { return axios.get('<API_URL>'); },