From fbe1616d26d875723597c265cb6904e4e8eda81c Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Wed, 3 May 2017 21:49:15 -0400 Subject: [PATCH] ajax with fetch --- js/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/index.js b/js/index.js index 2675fc4..5761e3b 100644 --- a/js/index.js +++ b/js/index.js @@ -4,6 +4,12 @@ import App from './components/app.js'; import { Provider } from 'react-redux' import store from './store.js' +fetch('https://stupidcomments.herokuapp.com/comments').then(function(response){ + response.json().then(function(data){ + console.log(data); + }); +}); + ReactDOM.render(