Archived
22 lines
618 B
JavaScript
22 lines
618 B
JavaScript
import React, { Component } from 'react';
|
|||
|
|
import PropTypes from 'prop-types';
|
||
|
|
|
||
|
|
axios.get('http://site1825.tw.cs.unibo.it/TW/globpop',
|
||
|
|
{
|
||
|
|
id: videoID // variabile con videoid
|
||
|
|
})
|
||
|
|
.then(
|
||
|
|
response => { // notazione moderna javascript per indicare function(response){}
|
||
|
|
// function(response){} == response => {}
|
||
|
|
console.log(response);
|
||
|
|
console.info(response.data);
|
||
|
|
|
||
|
|
},
|
||
|
|
// Note: it's important to handle errors here
|
||
|
|
// instead of a catch() block so that we don't swallow
|
||
|
|
// exceptions from actual bugs in components.
|
||
|
|
error => {
|
||
|
|
console.error(error);
|
||
|
|
}
|
||
|
|
);
|
||
|
|
export default fvitali;
|