Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Issue #1

Closed
pjago opened this issue Dec 31, 2015 · 1 comment
Closed

Test Issue #1

pjago opened this issue Dec 31, 2015 · 1 comment

Comments

@pjago
Copy link
Owner

pjago commented Dec 31, 2015

Is there a way of not replaying actions in the blacklist? I have code that waits for an action to be dispatched and them runs side-effects from there, by means of redux-saga:

function* saga( getState ){
  ...
  const getTasks = () => getState().TaskReducer;
  while(true){
    yield take(QUEUE);  //this is the line that waits for the next QUEUE action
    //those are the effects I don't wan't to redo
    for(const {type, payload} of getTasks()){switch(type){
      case SPAWN:  yield call(fetchSpawn, payload);  break;
      case INIT:  yield call(fetchInit, getWorkers(), payload);  break;
      case SUBSCRIBE:  yield call(fetchSubscribe, getWorkers(), payload);  break;
      ...
    }};
  }
}

Maybe we should make skipping blacklisted actions an option?
I am not sure if this could be useful in other cases, but I think it makes sense to be an addon. XD

@pjago
Copy link
Owner Author

pjago commented Dec 31, 2015

this was just a test. follow the actual issue here.

@pjago pjago closed this as completed Dec 31, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant