Closed jfet97 closed 1 year ago
@jfet97 very nice!
One thing I realised, would we maybe try merging useMutation and useAction via overloads?
Please add a changeset with pnpm changeset
, with minor version bump (due to breaking change value
-> success
)
@patroza
I'm unsure about the difference between const cancel = () => run.value(f.interrupt)
and const cancel = () => f.interrupt.runPromise
if we want to unify those functions. Are those the same?
@jfet97 the run.value
is more correct as it uses the same runtime as the actual running of the effects, though for cancellation it may not make a difference in practice, aligning it to run.value is good.
I went with not using an ADT because is the simpler solution, but we can discuss about it, depending also on Enrico's take on this