mobx-state-tree icon indicating copy to clipboard operation
mobx-state-tree copied to clipboard

feat(applyAction): returns Promise from the result of applyAction

Open abruzzihraig opened this issue 6 years ago • 5 comments

Implemented #439 There are two things may need us to be careful:

  • IActionRecorder.replay will return Promise<any[]>(same as the result of applyAction) instead of void/undefined.
  • Some docs or code that keep in other packages(e.g. mst-middlewares) haven't been updated yet, because they use mst from node modules.

abruzzihraig avatar Jun 08 '18 06:06 abruzzihraig

More discussion needed, but seems like a cool idea. Perhaps we could expose it as applyActionAsync to avoid a breaking change.

jamonholmgren avatar Dec 18 '20 19:12 jamonholmgren

If applyActionAsync is a viable path forward I'd be willing to clean this PR up @jamonholmgren

jesse-savary avatar Feb 08 '21 20:02 jesse-savary

This is a really good Idea I need this!

ryskin avatar Sep 27 '21 10:09 ryskin

When this will be merged???

ryskin avatar Oct 05 '21 01:10 ryskin

@jesse-savary Sorry, I didn't see this until now! I don't want to break any existing APIs right now, but I'd be more than happy to merge a PR with applyActionAsync if you want to tackle it.

jamonholmgren avatar Feb 28 '22 19:02 jamonholmgren

@jesse-savary Still interested in pushing this forward? I'd be happy to review.

jamonholmgren avatar Mar 10 '23 02:03 jamonholmgren

Hey folks - this PR has gone pretty stale, and we are going to be making some big diffs to the repo pretty soon.

I'm going to close this out. It's certainly a feasible and good option, and if anyone who was involved would like to implement the secondary applyActionAsync, I'd be happy to review a new PR to that effect. But in the absence of someone who is up for it, I'm going to close this out to clean things up.

Thanks all!

coolsoftwaretyler avatar Sep 21 '23 23:09 coolsoftwaretyler