export default (type, id) => { console.table([ type, id ]); return fetch(`https://swapi.co/api/${type}/?page=${id}`) .then(response => response.json()) .then(json => { console.log(json); return json; }) }
export default (type, id) => { console.table([ type, id ]); return fetch(`https://swapi.co/api/${type}/?page=${id}`) .then(response => response.json()) .then(json => { console.log(json); return json; }) }