-
-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Labels
RFCSome new feature that should be discussedSome new feature that should be discussed
Description
This has been discussed in the community chat and marked as a good idea, since retrying async operations is a very common need in web applications.
I believe every second developer has done it in their own projects, so I think it would be nice to have something like:
type RetryParams<A, B, C> = {
effect: Effect<A, B, C>
times: number | Store<number>
timeout: number | Store<number> | ((retryIndex: number (here we can also add params and error payload)) => number)
}
function retry<A, B, C>({
effect,
times,
timeout,
}: RetryParams<A, B, C>): Effect<A, B, C>
I can provide my own implementation if the idea would be approved.
Metadata
Metadata
Assignees
Labels
RFCSome new feature that should be discussedSome new feature that should be discussed