2016-01-05から1日間の記事一覧

JSONデータをReactでリスト表示する

単一コンポーネント this.setStateメソッドでstateとして取得 componentDidMount() { $.ajax({ url: this.props.url, data: { q: "select title from feed where url = '" + this.props.target + "'", format: "json" }, type: 'GET', dataType: 'json', suc…

はてなブログのfeedをjsonで取得してReactで表示してみる with YQL

前記事では、クロスドメインリクエストについて学びました。しかし、普通にCORSを行っても、No 'Access-Control-Allow-Origin' header is present on the requested resourceと返されるAPIがあります。セキュリティの問題からAPIが許可していないためです。 …