Untitled

mail@pastecode.io avatar
unknown
javascript
8 months ago
252 B
3
Indexable
Never
methods: {
  async fetchBitcoinPrice() {
    try {
      const response = await axios.get('<API_URL>');
      this.bitcoinPrice = response.data.bitcoin.usd;
    } catch (error) {
      console.error('Oops, something went wrong:', error);
    }
  },
},