Skip to content

Instantly share code, notes, and snippets.

@linjiang82
linjiang82 / asynch-jsonp-handler-w-ecma6-promise.markdown
Created May 8, 2017 13:06
Asynch JSONP handler, w/ ECMA6 Promise

Asynch JSONP handler, w/ ECMA6 Promise

This is a refinement to an earlier JSONp handler where I ran into an issue with accessing the response data due to timing. By passing the resolve and reject behaviours to the "then" method the new promise the data object returned in the callback is accessible. http://www.html5rocks.com/en/tutorials/es6/promises/

A Pen by John Lin on CodePen.

License.

@linjiang82
linjiang82 / index.html
Created March 14, 2017 00:30
Product List using React
<html>
<head>
</head>
<body>
<div id='wrapper'>
</div>
</body></html>