Skip to content

Instantly share code, notes, and snippets.

View anishd19's full-sized avatar
🕶️
Future belongs to those who dream!

Anish Dhamodaran anishd19

🕶️
Future belongs to those who dream!
View GitHub Profile
@anishd19
anishd19 / index.ts
Created July 6, 2021 08:12 — forked from hiroppy/index.ts
polling using redux-saga
import { delay } from 'redux-saga';
import { put, take, race, call, cancel, takeEvery } from 'redux-saga/effects';
import { Upload, addJob, removeJob } from '../actions/job';
function* upload(action: Upload) {
try {
const { file, jobId: id } = action.payload;
yield put(addJob({ id }));