-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Hey there, thanks for the great bindings!
Have you thought about adding a function like
let tap: (Promise.t<'val>, 'val => unit)The purpose of such a function would be to chain a side effect based on the value of a promise. For example, setting some React state if a promise is successful or logging in between thens
Currently, this can be achieved with
let tap = (p, f) = Promise.thenResolve(p, v => {
f(v)
v
})Metadata
Metadata
Assignees
Labels
No labels