Stuck on Camper Leaderboard

Stuck on Camper Leaderboard
0

#1

I am getting stuck on how to get the camper data and use it in my react components. So far I have this: It

//
var request = new XMLHttpRequest();
request.open(‘GET’, “https://fcctop100.herokuapp.com/api/fccusers/top/recent” );
request.onload = function() {
var data = JSON.parse(request.responseText);
console.log(data);

};
request.send();
//

It does seem to get the data and log it to the console, but I tried to loop through it in order to make multiple instances of my component:

//
var Camper = React.createClass ({
render: function () {
return (


99


{this.props.username}

{this.props.recent}

{this.props.alltime}

  );

}
});

//

I haven’t been able to get it to work. First it would only render the last instance, so I assumed it was just replacing each one each time it rendered. Does anybody have any hints to get me on the right track? There must be something either small or major that I’m missing. Thanks for your help!


#2

P.S. Sorry the formatting came out all weird. Hopefully someone out there can make sense of it.