I am trying to render several components - but my service is a from a lamp stack. -- after rendering the component I try and do an ajax call -- I can see the call comes back in the network console -- but the alert is never triggered -- I've tried the ajax approach as well.
componentDidMount() {
$.getJSON("http://localhost/react4/sample.json?callback=?", function(result){
//response data are now in the result variable
alert(result);
});
}
//sample.json
[{"date": "2nd Aug"}]
network packet screenshot -- call and response from localhost
localhost - lamp stack running -- dummy json coming through
code on reactjs -- getjson doing the callback
only check1 appears -- its as if the response never comes back