Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- `Array []
- __proto__: {…}
- __defineGetter__: function __defineGetter__()
- __defineSetter__: function __defineSetter__()
- __lookupGetter__: function __lookupGetter__()
- __lookupSetter__: function __lookupSetter__()
- constructor: function Object()
- hasOwnProperty: function hasOwnProperty()
- isPrototypeOf: function isPrototypeOf()
- propertyIsEnumerable: function propertyIsEnumerable()
- toLocaleString: function toLocaleString()
- toSource: function toSource()
- toString: function toString()
- unwatch: function unwatch()
- valueOf: function valueOf()
- watch: function watch()`
- function RenderData (jsonData){
- console.log(jsonData);
- return <p>Dont change me</p>;
- }
- class GetLeaderBoard extends React.Component{
- constructor(props) {
- super(props);
- this.state = {
- data:[]
- };
- }
- componentDidMount(){
- var responseData =[];
- axios.get('https://fcctop100.herokuapp.com/api/fccusers/top/recent').then((response)=>{
- this.setState(()=>{
- return {
- data:response.data
- }
- })
- })
- .catch(function (error) {
- console.log(error);
- });
- }
- render(){
- var renderedData = <RenderData jsonData={this.state.data}/>;
- return renderedData
- }
- }
- ReactDOM.render(
- <GetLeaderBoard />,
- document.getElementById('main')
- );
Add Comment
Please, Sign In to add comment