Skip to content

Instantly share code, notes, and snippets.

View asynch-jsonp-handler-w-ecma6-promise.markdown

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.

A Pen by John Lin on CodePen.


linjiang82 / index.html
Created Mar 14, 2017
Product List using React
View index.html
<div id='wrapper'>
You can’t perform that action at this time.