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

Skip blacklisted actions #3

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

Skip blacklisted actions #3

pjago opened this issue Dec 31, 2015 · 1 comment

Comments

@pjago
Copy link

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

@zalmoxisus
Copy link
Owner

Hey, @pedro-iago, thanks for the suggestion!

redux-devtools-filter-actions acts like a monitor, so it is only a view without the ability to change anything in the lifted state (we cannot remove actions from devtools store).

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

2 participants