fetch('http://localhost:3001/api',{mode: 'no-cors'}) .then( res => res.json()) .then (data => setData(data) )