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
docs: fix broken internal links in the query docs (#7247)
* wip - 1
* Fix more links
* Fix one more link
* Another one
* Update a link
* Fix the broken links in the Angular docs
* Fix the broken links in the Vue docs
* Fix the Svelte links in the docs
---------
Co-authored-by: Dominik Dorfmeister <office@dorfmeister.cc>
Copy file name to clipboardExpand all lines: docs/framework/angular/guides/caching.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Let's assume we are using the default `gcTime` of **5 minutes** and the default
23
23
- A second instance of `injectQuery(() => ({ queryKey: ['todos'], queryFn: fetchTodos })` initializes elsewhere.
24
24
- Since the cache already has data for the `['todos']` key from the first query, that data is immediately returned from the cache.
25
25
- The new instance triggers a new network request using its query function.
26
-
- Note that regardless of whether both `fetchTodos` query functions are identical or not, both queries' [`status`](../injectQuery) are updated (including `isFetching`, `isPending`, and other related values) because they have the same query key.
26
+
- Note that regardless of whether both `fetchTodos` query functions are identical or not, both queries' [`status`](../../reference/injectQuery) are updated (including `isFetching`, `isPending`, and other related values) because they have the same query key.
27
27
- When the request completes successfully, the cache's data under the `['todos']` key is updated with the new data, and both instances are updated with the new data.
28
28
- Both instances of the `injectQuery(() => ({ queryKey: ['todos'], queryFn: fetchTodos })` query are destroyed and no longer in use.
29
29
- Since there are no more active instances of this query, a garbage collection timeout is set using `gcTime` to delete and garbage collect the query (defaults to **5 minutes**).
For more information, check out the [NextJs Suspense Streaming Example](../examples/nextjs-suspense-streaming).
424
+
For more information, check out the [NextJs Suspense Streaming Example](../../examples/nextjs-suspense-streaming).
425
425
426
426
The big upside is that you no longer need to prefetch queries manually to have SSR work, and it even still streams in the result! This gives you phenomenal DX and lower code complexity.
Copy file name to clipboardExpand all lines: docs/framework/react/guides/caching.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Let's assume we are using the default `gcTime` of **5 minutes** and the default
23
23
- A second instance of `useQuery({ queryKey: ['todos'], queryFn: fetchTodos })` mounts elsewhere.
24
24
- Since the cache already has data for the `['todos']` key from the first query, that data is immediately returned from the cache.
25
25
- The new instance triggers a new network request using its query function.
26
-
- Note that regardless of whether both `fetchTodos` query functions are identical or not, both queries' [`status`](../useQuery) are updated (including `isFetching`, `isPending`, and other related values) because they have the same query key.
26
+
- Note that regardless of whether both `fetchTodos` query functions are identical or not, both queries' [`status`](../../reference/useQuery) are updated (including `isFetching`, `isPending`, and other related values) because they have the same query key.
27
27
- When the request completes successfully, the cache's data under the `['todos']` key is updated with the new data, and both instances are updated with the new data.
28
28
- Both instances of the `useQuery({ queryKey: ['todos'], queryFn: fetchTodos })` query are unmounted and no longer in use.
29
29
- Since there are no more active instances of this query, a garbage collection timeout is set using `gcTime` to delete and garbage collect the query (defaults to **5 minutes**).
Dependent queries by definition constitutes a form of [request waterfall](../request-waterfalls), which hurts performance. If we pretend both queries take the same amount of time, doing them serially instead of in parallel always takes twice as much time, which is especially hurtful when it happens on a client that has high latency. If you can, it's always better to restructure the backend APIs so that both queries can be fetched in parallel, though that might not always be practically feasible.
93
+
Dependent queries by definition constitutes a form of [request waterfall](../../../react/guides/request-waterfalls), which hurts performance. If we pretend both queries take the same amount of time, doing them serially instead of in parallel always takes twice as much time, which is especially hurtful when it happens on a client that has high latency. If you can, it's always better to restructure the backend APIs so that both queries can be fetched in parallel, though that might not always be practically feasible.
94
94
95
95
In the example above, instead of first fetching `getUserByEmail` to be able to `getProjectsByUser`, introducing a new `getProjectsByUserEmail` query would flatten the waterfall.
Copy file name to clipboardExpand all lines: docs/framework/react/guides/initial-query-data.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ There are many ways to supply initial data for a query to the cache before you n
8
8
- Declaratively:
9
9
- Provide `initialData` to a query to prepopulate its cache if empty
10
10
- Imperatively:
11
-
-[Prefetch the data using `queryClient.prefetchQuery`](../prefetching)
12
-
-[Manually place the data into the cache using `queryClient.setQueryData`](../prefetching)
11
+
-[Prefetch the data using `queryClient.prefetchQuery`](../../../react/guides/prefetching)
12
+
-[Manually place the data into the cache using `queryClient.setQueryData`](../../../react/guides/prefetching)
13
13
14
14
## Using `initialData` to prepopulate a query
15
15
@@ -170,6 +170,6 @@ const result = useQuery({
170
170
171
171
## Further reading
172
172
173
-
For a comparison between `Initial Data` and `Placeholder Data`, have a look at the [Community Resources](../tkdodos-blog#9-placeholder-and-initial-data-in-react-query).
173
+
For a comparison between `Initial Data` and `Placeholder Data`, have a look at the [Community Resources](../../community/tkdodos-blog#9-placeholder-and-initial-data-in-react-query).
Copy file name to clipboardExpand all lines: docs/framework/react/guides/migrating-to-react-query-3.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,8 +103,8 @@ try {
103
103
104
104
Together, these provide the same experience as before, but with added control to choose which component trees you want to reset. For more information, see:
Copy file name to clipboardExpand all lines: docs/framework/react/guides/migrating-to-react-query-4.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,7 +134,7 @@ The `useQueries` hook now accepts an object with a `queries` prop as its input.
134
134
135
135
### Undefined is an illegal cache value for successful queries
136
136
137
-
In order to make bailing out of updates possible by returning `undefined`, we had to make `undefined` an illegal cache value. This is in-line with other concepts of react-query, for example, returning `undefined` from the [initialData function](guides/initial-query-data#initial-data-function) will also _not_ set data.
137
+
In order to make bailing out of updates possible by returning `undefined`, we had to make `undefined` an illegal cache value. This is in-line with other concepts of react-query, for example, returning `undefined` from the [initialData function](../initial-query-data#initial-data-function) will also _not_ set data.
138
138
139
139
Further, it is an easy bug to produce `Promise<void>` by adding logging in the queryFn:
140
140
@@ -234,7 +234,7 @@ The filter defaults to `all`, and you can choose to only match `active` or `inac
234
234
235
235
#### refetchActive / refetchInactive
236
236
237
-
[queryClient.invalidateQueries](../QueryClient#queryclientinvalidatequeries) had two additional, similar flags:
237
+
[queryClient.invalidateQueries](../../../../reference/QueryClient/#queryclientinvalidatequeries) had two additional, similar flags:
### `persistQueryClient` and the corresponding persister plugins are no longer experimental and have been renamed
274
274
275
-
The plugins `createWebStoragePersistor` and `createAsyncStoragePersistor` have been renamed to [`createSyncStoragePersister`](../createSyncStoragePersister) and [`createAsyncStoragePersister`](../createAsyncStoragePersister) respectively. The interface `Persistor` in `persistQueryClient` has also been renamed to `Persister`. Checkout [this stackexchange](https://english.stackexchange.com/questions/206893/persister-or-persistor) for the motivation of this change.
275
+
The plugins `createWebStoragePersistor` and `createAsyncStoragePersistor` have been renamed to [`createSyncStoragePersister`](../../plugins/createSyncStoragePersister) and [`createAsyncStoragePersister`](../../plugins/createAsyncStoragePersister) respectively. The interface `Persistor` in `persistQueryClient` has also been renamed to `Persister`. Checkout [this stackexchange](https://english.stackexchange.com/questions/206893/persister-or-persistor) for the motivation of this change.
276
276
277
277
Since these plugins are no longer experimental, their import paths have also been updated:
278
278
@@ -296,7 +296,7 @@ Types now require using TypeScript v4.1 or greater
296
296
297
297
### Supported Browsers
298
298
299
-
As of v4, React Query is optimized for modern browsers. We have updated our browserslist to produce a more modern, performant and smaller bundle. You can read about the requirements [here](./installation#requirements).
299
+
As of v4, React Query is optimized for modern browsers. We have updated our browserslist to produce a more modern, performant and smaller bundle. You can read about the requirements [here](../../installation#requirements).
300
300
301
301
### `setLogger` is removed
302
302
@@ -419,7 +419,7 @@ React Query defaults to "tracking" query properties, which should give you a nic
419
419
420
420
### Bailing out of updates with setQueryData
421
421
422
-
When using the [functional updater form of setQueryData](../QueryClient#queryclientsetquerydata), you can now bail out of the update by returning `undefined`. This is helpful if `undefined` is given to you as `previousValue`, which means that currently, no cached entry exists and you don't want to / cannot create one, like in the example of toggling a todo:
422
+
When using the [functional updater form of setQueryData](../../../../reference/QueryClient/#queryclientsetquerydata), you can now bail out of the update by returning `undefined`. This is helpful if `undefined` is given to you as `previousValue`, which means that currently, no cached entry exists and you don't want to / cannot create one, like in the example of toggling a todo:
Copy file name to clipboardExpand all lines: docs/framework/react/guides/migrating-to-v5.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,7 +186,7 @@ Custom loggers were already deprecated in 4 and have been removed in this versio
186
186
187
187
### Supported Browsers
188
188
189
-
We have updated our browserslist to produce a more modern, performant and smaller bundle. You can read about the requirements [here](./installation#requirements).
189
+
We have updated our browserslist to produce a more modern, performant and smaller bundle. You can read about the requirements [here](../../installation#requirements).
190
190
191
191
### Private class fields and methods
192
192
@@ -235,7 +235,7 @@ useQuery<number, string>({
235
235
})
236
236
```
237
237
238
-
For a way to set a different kind of Error globally, see [the TypeScript Guide](./typescript#registering-a-global-error).
238
+
For a way to set a different kind of Error globally, see [the TypeScript Guide](../../typescript#registering-a-global-error).
239
239
240
240
### eslint `prefer-query-object-syntax` rule is removed
241
241
@@ -488,17 +488,17 @@ Infinite Queries can be prefetched like regular Queries. Per default, only the f
488
488
489
489
### New `combine` option for `useQueries`
490
490
491
-
See the [useQueries docs](../useQueries#combine) for more details.
491
+
See the [useQueries docs](../../reference/useQueries#combine) for more details.
492
492
493
493
### Experimental `fine grained storage persister`
494
494
495
-
See the [experimental_createPersister docs](../createPersister) for more details.
495
+
See the [experimental_createPersister docs](../../../react/plugins/createPersister) for more details.
496
496
497
497
[//]: #'FrameworkSpecificNewFeatures'
498
498
499
499
### Typesafe way to create Query Options
500
500
501
-
See the [TypeScript docs](./typescript#typing-query-options) for more details.
501
+
See the [TypeScript docs](../../typescript#typing-query-options) for more details.
0 commit comments