redux-logic
redux-logic copied to clipboard
Feature Request: retryWhen policy
It would be great to have retryWhen policy as a configuration to createLogic. So, it will be easier to implement retry policy without digging into observables. Ideally, just expose predicate function with some context information as a parameter to that function.
retryWhen(({retry, action, cancelled$}) => {
// retry object may contain logic or retry specific options
// and some methods to deal with retry policy
retry.delay(retry.throttle);
return retry.errorCount <=2;
})
@pocheptsov Thanks for submitting the idea. I'll give this some thought.