Skip to content

Instantly share code, notes, and snippets.

View KDCinfo's full-sized avatar
💭
Flutter Developer | Contra Costa Co. CA

Keith D Commiskey KDCinfo

💭
Flutter Developer | Contra Costa Co. CA
View GitHub Profile
@KDCinfo
KDCinfo / example01.js
Last active February 8, 2018 02:41 — forked from mpj/example01.js
Code for the async/await episode of Fun Fun Function from https://www.youtube.com/watch?v=568g8hxJJp4
const response = await fetch(`https://catappapi.herokuapp.com/users/${userId}`)
const data = await response.json()
return data.imageUrl
}
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 () {