import React from 'react'; import ReactDOM from 'react-dom'; function fnFetch(url){ return fetch(url).then(res=>{ if(res.ok){ return res.json(); } }).then(res=>{ return res; }) } class App extends React.Component{ state ={ isLoading:false, data:null }; fetchData = async() =>{ let data = await fnFetch('https://api.github.com/users/asdfds'); this.setState({data}); }; render(){ let {isLoading, data} = this.state; return (