react-refetch icon indicating copy to clipboard operation
react-refetch copied to clipboard

`andThen` isn't called if the same mapping has a `then`

Open nfcampos opened this issue 10 years ago • 3 comments

Not sure whether we should support this, but we should definitely check that the user doesn't define both on the same mapping, since only then will be called.

(same is true for catch and andCatch)

nfcampos avatar Apr 15 '16 16:04 nfcampos

Hmm, good point. It's a bit unclear what the order would be if we did support it. I agree, let's block it until there is a good reason to support both.

ryanbrainard avatar Apr 18 '16 20:04 ryanbrainard

I need to remember what I was trying to do using both that led me to find it wasn't possible, it's certainly not a common need. In a way you can already do it, I guess you just have to define the andThen hook on the then mapping, instead of the original

nfcampos avatar Apr 18 '16 21:04 nfcampos

In a way you can already do it, I guess you just have to define the andThen hook on the then mapping, instead of the original

yeah, if someone really needs it, they can do it explicitly like that.

ryanbrainard avatar Apr 18 '16 22:04 ryanbrainard