Skip to content

Instantly share code, notes, and snippets.

View danroberts's full-sized avatar

danroberts

View GitHub Profile
function getSatellites() {
return (dispatch, getState) {
api.fetch('getOrganizations').then((response) {
//if handling this data response is at all complicated, then you need to duplicate it.
dispatch(recieveOrganizations(response.data))
api.fetch('getSatellites', getState().organizations).then(response) {
dispatch(receiveSatellites(response.data))
}
})