Skip to content

Instantly share code, notes, and snippets.

@sebastialonso
Created December 4, 2016 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebastialonso/20b385d77f8d940667591af4e3c3bab0 to your computer and use it in GitHub Desktop.
Save sebastialonso/20b385d77f8d940667591af4e3c3bab0 to your computer and use it in GitHub Desktop.
import Request from 'superagent';
export function getIssues() {
const request = Request
.get('http://issues.com/issues')
return (dispatch) => {
request.end((err, res) => {
if (res.ok)
dispatch({
type: 'GET_ISSUES',
payload: res.body.issues
});
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment