Skip to content

Instantly share code, notes, and snippets.

View johnmarinelli's full-sized avatar

John Marinelli johnmarinelli

View GitHub Profile
@johnmarinelli
johnmarinelli / saga.js
Last active September 5, 2018 18:14
redux-saga call() not working?
import { put, call, takeEvery } from 'redux-saga/effects'
import * as Actions from '@actions/Artsy'
export function* fetchData(client, artworkId) {
yield call(Actions.artsyFetchStart)
try {
const artwork = yield call(client.getData, { id: artworkId }) // this returns undefined
yield call(Actions.artsyFetchSuccess)