Skip to content

Commit 8fa8265

Browse files
fulopkovacsTkDodo
andauthored
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>
1 parent 5b6c67f commit 8fa8265

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+109
-99
lines changed

docs/framework/angular/guides/caching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Let's assume we are using the default `gcTime` of **5 minutes** and the default
2323
- A second instance of `injectQuery(() => ({ queryKey: ['todos'], queryFn: fetchTodos })` initializes elsewhere.
2424
- Since the cache already has data for the `['todos']` key from the first query, that data is immediately returned from the cache.
2525
- 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.
2727
- 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.
2828
- Both instances of the `injectQuery(() => ({ queryKey: ['todos'], queryFn: fetchTodos })` query are destroyed and no longer in use.
2929
- 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**).

docs/framework/angular/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ type Response = {
114114
115115
## You talked me into it, so what now?
116116
117-
- Learn Angular Query at your own pace with our amazingly thorough [Walkthrough Guide](./installation) and [API Reference](../injectQuery)
117+
- Learn Angular Query at your own pace with our amazingly thorough [Walkthrough Guide](../installation) and [API Reference](../reference/injectQuery)

docs/framework/react/guides/advanced-ssr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ export function Providers(props: { children: React.ReactNode }) {
421421
}
422422
```
423423

424-
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).
425425

426426
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.
427427

docs/framework/react/guides/caching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Let's assume we are using the default `gcTime` of **5 minutes** and the default
2323
- A second instance of `useQuery({ queryKey: ['todos'], queryFn: fetchTodos })` mounts elsewhere.
2424
- Since the cache already has data for the `['todos']` key from the first query, that data is immediately returned from the cache.
2525
- 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.
2727
- 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.
2828
- Both instances of the `useQuery({ queryKey: ['todos'], queryFn: fetchTodos })` query are unmounted and no longer in use.
2929
- 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**).

docs/framework/react/guides/dependent-queries.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,6 @@ const usersMessages = useQueries({
9090

9191
## A note about performance
9292

93-
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.
9494

9595
In the example above, instead of first fetching `getUserByEmail` to be able to `getProjectsByUser`, introducing a new `getProjectsByUserEmail` query would flatten the waterfall.

docs/framework/react/guides/important-defaults.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Out of the box, TanStack Query is configured with **aggressive but sane** defaul
3636

3737
Have a look at the following articles from our Community Resources for further explanations of the defaults:
3838

39-
- [Practical React Query](../tkdodos-blog#1-practical-react-query)
40-
- [React Query as a State Manager](../tkdodos-blog#10-react-query-as-a-state-manager)
39+
- [Practical React Query](../../community/tkdodos-blog#1-practical-react-query)
40+
- [React Query as a State Manager](../../community/tkdodos-blog#10-react-query-as-a-state-manager)
4141

4242
[//]: # 'Materials'

docs/framework/react/guides/initial-query-data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ There are many ways to supply initial data for a query to the cache before you n
88
- Declaratively:
99
- Provide `initialData` to a query to prepopulate its cache if empty
1010
- 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)
1313

1414
## Using `initialData` to prepopulate a query
1515

@@ -170,6 +170,6 @@ const result = useQuery({
170170

171171
## Further reading
172172

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).
174174

175175
[//]: # 'Materials'

docs/framework/react/guides/migrating-to-react-query-3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ try {
103103

104104
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:
105105

106-
- [QueryErrorResetBoundary](../QueryErrorResetBoundary)
107-
- [useQueryErrorResetBoundary](../useQueryErrorResetBoundary)
106+
- [QueryErrorResetBoundary](../../reference/QueryErrorResetBoundary)
107+
- [useQueryErrorResetBoundary](../../reference/useQueryErrorResetBoundary)
108108

109109
### `QueryCache.getQuery()` has been replaced by `QueryCache.find()`.
110110

docs/framework/react/guides/migrating-to-react-query-4.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ The `useQueries` hook now accepts an object with a `queries` prop as its input.
134134

135135
### Undefined is an illegal cache value for successful queries
136136

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.
138138

139139
Further, it is an easy bug to produce `Promise<void>` by adding logging in the queryFn:
140140

@@ -234,7 +234,7 @@ The filter defaults to `all`, and you can choose to only match `active` or `inac
234234

235235
#### refetchActive / refetchInactive
236236

237-
[queryClient.invalidateQueries](../QueryClient#queryclientinvalidatequeries) had two additional, similar flags:
237+
[queryClient.invalidateQueries](../../../../reference/QueryClient/#queryclientinvalidatequeries) had two additional, similar flags:
238238

239239
```
240240
refetchActive: Boolean
@@ -272,7 +272,7 @@ React.useEffect(() => mySideEffectHere(data), [data])
272272

273273
### `persistQueryClient` and the corresponding persister plugins are no longer experimental and have been renamed
274274

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.
276276

277277
Since these plugins are no longer experimental, their import paths have also been updated:
278278

@@ -296,7 +296,7 @@ Types now require using TypeScript v4.1 or greater
296296

297297
### Supported Browsers
298298

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).
300300

301301
### `setLogger` is removed
302302

@@ -419,7 +419,7 @@ React Query defaults to "tracking" query properties, which should give you a nic
419419

420420
### Bailing out of updates with setQueryData
421421

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:
423423

424424
```tsx
425425
queryClient.setQueryData(['todo', id], (previousTodo) =>

docs/framework/react/guides/migrating-to-v5.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Custom loggers were already deprecated in 4 and have been removed in this versio
186186

187187
### Supported Browsers
188188

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).
190190

191191
### Private class fields and methods
192192

@@ -235,7 +235,7 @@ useQuery<number, string>({
235235
})
236236
```
237237

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).
239239

240240
### eslint `prefer-query-object-syntax` rule is removed
241241

@@ -488,17 +488,17 @@ Infinite Queries can be prefetched like regular Queries. Per default, only the f
488488

489489
### New `combine` option for `useQueries`
490490

491-
See the [useQueries docs](../useQueries#combine) for more details.
491+
See the [useQueries docs](../../reference/useQueries#combine) for more details.
492492

493493
### Experimental `fine grained storage persister`
494494

495-
See the [experimental_createPersister docs](../createPersister) for more details.
495+
See the [experimental_createPersister docs](../../../react/plugins/createPersister) for more details.
496496

497497
[//]: # 'FrameworkSpecificNewFeatures'
498498

499499
### Typesafe way to create Query Options
500500

501-
See the [TypeScript docs](./typescript#typing-query-options) for more details.
501+
See the [TypeScript docs](../../typescript#typing-query-options) for more details.
502502

503503
### new hooks for suspense
504504

0 commit comments

Comments
 (0)