2016-07-17 1 views

答えて

1

componentDidMount()には、そのデータを取得するためにajax呼び出しを実行するだけです。

componentDidMount() { 
    $.ajax({ 
    url: "https://api.myjson.com/bins/34ds9", 
    method: "GET" 
    }).done((data) => { 
    // Do whatever in here, set state, etc. 
    }); 
} 
関連する問題