@tanstack/vue-query 4.22.0 → 4.24.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -79,5 +79,5 @@ Visit https://tanstack.com/query/v4/docs/adapters/vue-query
|
|
|
79
79
|
const id = ref(1);
|
|
80
80
|
const enabled = ref(false);
|
|
81
81
|
|
|
82
|
-
const query = useQuery({
|
|
82
|
+
const query = useQuery({ queryKey: ["todos", id], queryFn: () => getTodos(id), enabled });
|
|
83
83
|
```
|
|
@@ -810,6 +810,7 @@
|
|
|
810
810
|
this.queryHash = config.queryHash;
|
|
811
811
|
this.initialState = config.state || getDefaultState$1(this.options);
|
|
812
812
|
this.state = this.initialState;
|
|
813
|
+
this.scheduleGc();
|
|
813
814
|
}
|
|
814
815
|
|
|
815
816
|
get meta() {
|
|
@@ -3036,7 +3037,7 @@
|
|
|
3036
3037
|
notify(options) {
|
|
3037
3038
|
notifyManager.batch(() => {
|
|
3038
3039
|
// First trigger the mutate callbacks
|
|
3039
|
-
if (this.mutateOptions) {
|
|
3040
|
+
if (this.mutateOptions && this.hasListeners()) {
|
|
3040
3041
|
if (options.onSuccess) {
|
|
3041
3042
|
var _this$mutateOptions$o, _this$mutateOptions, _this$mutateOptions$o2, _this$mutateOptions2;
|
|
3042
3043
|
|