Open
Description
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
Metadata
Assignees
Labels
No labels