redux-logic icon indicating copy to clipboard operation
redux-logic copied to clipboard

Feature Request: retryWhen policy

Open pocheptsov opened this issue 8 years ago • 1 comments

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 avatar Mar 15 '17 18:03 pocheptsov

@pocheptsov Thanks for submitting the idea. I'll give this some thought.

jeffbski avatar Mar 16 '17 19:03 jeffbski