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
})
Hey there, thanks for the great bindings!
Have you thought about adding a function like
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
thensCurrently, this can be achieved with