score:3

Accepted answer

I suspect the problem is in your startListener saga. You should use either while cycle with the take effect or use takeEvery without while cycle. Right now you are mixing the two together.

Try this:

function* startListener() {
  const updateChannel = createEventChannel();
  while (true) {
    const data = yield take(updateChannel);
    yield put(UPDATE_STORE(data));
  }
}

or this:

function* startListener() {
  const updateChannel = createEventChannel();
  yield takeEvery(updateChannel, function*(data) {
    yield put(UPDATE_STORE(data));
  });
}

Related Query

More Query from same tag