0

here i want delay the images fetching in below coding.How i can achieve this in redux saga. https://codesandbox.io/s/redux-saga-mxrfhz?file=/src/sagas/users.js

import { takeEvery, call, put, fork } from "redux-saga/effects";
import * as actions from "../actions/users";
import * as api from "../api/users";

function* getUsers() {
  try {
    const result = yield call(api.getUsers);
    yield put(actions.getUsersSuccess(result.data.data));
  } catch (error) {
    console.error(error);
  }
}

function* watchGetUsersRequest() {
  yield takeEvery(actions.Types.GET_USERS_REQUEST, getUsers);
}

const userSagas = [fork(watchGetUsersRequest)];

export default userSagas;

  • Your question is unclear. You want to delay the images but there is no image API call. Are you expecting something like this? https://stackoverflow.com/questions/47634803/waiting-in-a-redux-saga – mc-user May 11 '22 at 05:50
  • I have attached my coding in codesandbox – vinothini K B May 11 '22 at 06:45
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community May 11 '22 at 11:08

0 Answers0