You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Sebastien, thanks for adding onSuccess hooks! Just noting a couple things that could improve the usage flexibility.
often there is a need to know not just the result but also the original params that went into the execute method call (there is a workaround possible, but still could be nice to have this)
most of the time we need to ignore onSuccess if the operation/screen is no longer relevant, to not show unexpected toast message/do setState/etc; the former check can be accomodated via the isCurrent call (although I am not sure why it needs a call rather than being just a boolean), but the latter needs an is-mounted check, which would be great to pass in as a flag to onSuccess as well
Thanks for your work on this library, cheers!
The text was updated successfully, but these errors were encountered:
there is a result.currentParams returned. If you really need the params of the success/error calls, I'm ok to include this
I need it to be a call because you might want to show an error message and dismiss it 2secs later. isCurrent may help you avoid dismissing the wrong error message. I'd be ok to include isMounted into the callback if it helps
I don't have time this week to work on this but if you want feel free to open a PR :)
Hi Sebastien, thanks for adding onSuccess hooks! Just noting a couple things that could improve the usage flexibility.
execute
method call (there is a workaround possible, but still could be nice to have this)isCurrent
call (although I am not sure why it needs a call rather than being just a boolean), but the latter needs an is-mounted check, which would be great to pass in as a flag to onSuccess as wellThanks for your work on this library, cheers!
The text was updated successfully, but these errors were encountered: