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
Copy file name to clipboardExpand all lines: docs/api/InfiniteQuery.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ Class wrapper for [@tanstack-query/core infinite queries](https://tanstack.com/q
4
4
5
5
[_See docs for Query_](/api/Query)
6
6
7
+
**All documentation about properties and methods of infinite query can be found in the original documentation [here](https://tanstack.com/query/latest/docs/framework/react/reference/useInfiniteQuery)**
8
+
7
9
[Reference to source code](/src/infinite-query.ts)
Copy file name to clipboardExpand all lines: docs/api/Mutation.md
+43-21Lines changed: 43 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
-
# Mutation
1
+
# Mutation
2
2
3
-
Class wrapper for [@tanstack-query/core mutations](https://tanstack.com/query/latest/docs/framework/react/guides/mutations) with **MobX** reactivity
3
+
Class wrapper for [@tanstack-query/core mutations](https://tanstack.com/query/latest/docs/framework/react/guides/mutations) with **MobX** reactivity
4
4
5
-
[Reference to source code](/src/mutation.ts)
5
+
**All documentation about properties and methods of mutation can be found in the original documentation [here](https://tanstack.com/query/latest/docs/framework/react/reference/useMutation)**
6
6
7
-
## Usage
7
+
[Reference to source code](/src/mutation.ts)
8
+
9
+
## Usage
8
10
9
11
Create an instance of `Mutation` with [`mutationFn`](https://tanstack.com/query/latest/docs/framework/react/guides/mutations) parameter
10
12
@@ -36,12 +38,13 @@ const petCreateMutation = new Mutation({
36
38
const result =awaitpetCreateMutation.mutate('Fluffy');
This field is necessary to kill all reactions and subscriptions that are created during the creation of an instance of the `Mutation` class
47
+
This field is necessary to kill all reactions and subscriptions that are created during the creation of an instance of the `Mutation` class
45
48
46
49
```ts
47
50
const abortController =newAbortController();
@@ -61,27 +64,46 @@ abortController.abort();
61
64
62
65
This is alternative for `destroy` method
63
66
64
-
### `destroy()` method
65
-
This method is necessary to kill all reactions and subscriptions that are created during the creation of an instance of the `Mutation` class
67
+
### `lazy` option
68
+
69
+
This option enables "lazy" mode of the mutation. That means that all subscriptions and reaction will be created only when you request result for this mutation.
This method is necessary to kill all reactions and subscriptions that are created during the creation of an instance of the `Mutation` class
66
88
67
-
This is alternative for `abortSignal` option
89
+
This is alternative for `abortSignal` option
68
90
69
-
### method `mutate(variables, options?)`
70
-
Runs the mutation. (Works the as `mutate` function in [`useMutation` hook](https://tanstack.com/query/latest/docs/framework/react/reference/useMutation))
91
+
### method `mutate(variables, options?)`
71
92
72
-
### hook `onDone()`
73
-
Subscribe when mutation has been successfully finished
93
+
Runs the mutation. (Works the as `mutate` function in [`useMutation` hook](https://tanstack.com/query/latest/docs/framework/react/reference/useMutation))
74
94
75
-
### hook `onError()`
76
-
Subscribe when mutation has been finished with failure
95
+
### hook `onDone()`
77
96
78
-
### method `reset()`
79
-
Reset current mutation
97
+
Subscribe when mutation has been successfully finished
0 commit comments