Skip to content

Commit

Permalink
chore: expose mutateAsync explictly for a nicer api
Browse files Browse the repository at this point in the history
  • Loading branch information
sandstone991 committed Apr 6, 2024
1 parent ce06d10 commit 49f6725
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mobbing-query",
"description": "A very tiny wrapper around tanstack/query-core to provide observable queries inside mobx",
"author": "Ahmed Azzam",
"version": "1.0.4",
"version": "1.0.5",
"repository": {
"type": "git",
"url": "https://github.com/sandstone991/MobQ"
Expand Down
5 changes: 4 additions & 1 deletion src/Mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,11 @@ class _MobxMutation<
}
_updateOptions() {
this.mObserver.setOptions(this.wrapEffectsWithActions(this.mutationOptions));
this.state = this.mObserver.getCurrentResult();
}
get mutateAsnyc(){
return this.state.mutate
}

dispose() {
this.dispoables.forEach((fn) => fn());
}
Expand Down

0 comments on commit 49f6725

Please sign in to comment.