This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const response = await fetch(`https://catappapi.herokuapp.com/users/${userId}`) | |
| const data = await response.json() | |
| return data.imageUrl | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from 'react' | |
| import PropTypes from 'prop-types' | |
| // mock/pretend API | |
| let dogs = [ | |
| { id: '1', name: 'Castor', favoriteToy: 'bone' }, | |
| { id: '2', name: 'Gandalf', favoriteToy: 'Stick' } | |
| ] | |
| const API = { | |
| getDogs () { |