mobx-state-tree
mobx-state-tree copied to clipboard
feat(applyAction): returns Promise from the result of applyAction
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.
More discussion needed, but seems like a cool idea. Perhaps we could expose it as applyActionAsync
to avoid a breaking change.
If applyActionAsync
is a viable path forward I'd be willing to clean this PR up @jamonholmgren
This is a really good Idea I need this!
When this will be merged???
@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.
@jesse-savary Still interested in pushing this forward? I'd be happy to review.
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!