Skip to content

Commit b11c876

Browse files
committed
Fix more links
1 parent 5e32e96 commit b11c876

40 files changed

+101
-91
lines changed

docs/framework/angular/guides/caching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: caching
33
title: Caching Examples
44
---
55

6-
> Please thoroughly read the [Important Defaults](../important-defaults) before reading this guide
6+
> Please thoroughly read the [Important Defaults](./important-defaults) before reading this guide
77
88
## Basic Example
99

docs/framework/angular/guides/invalidations-from-mutations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ export class TodosComponent {
4040

4141
[//]: # 'Example2'
4242

43-
You can wire up your invalidations to happen using any of the callbacks available in the [`injectMutation` function](../mutations)
43+
You can wire up your invalidations to happen using any of the callbacks available in the [`injectMutation` function](./mutations)

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/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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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](../reference/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](../../../reference/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`](../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.
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](../../../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:
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](../plugins/createPersister) for more details.
495+
See the [experimental_createPersister docs](../../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

docs/framework/react/guides/mutations.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Beyond those primary states, more information is available depending on the stat
5959

6060
In the example above, you also saw that you can pass variables to your mutations function by calling the `mutate` function with a **single variable or object**.
6161

62-
Even with just variables, mutations aren't all that special, but when used with the `onSuccess` option, the [Query Client's `invalidateQueries` method](../../../reference/QueryClient/#queryclientinvalidatequeries) and the [Query Client's `setQueryData` method](../../../reference/QueryClient/#queryclientsetquerydata), mutations become a very powerful tool.
62+
Even with just variables, mutations aren't all that special, but when used with the `onSuccess` option, the [Query Client's `invalidateQueries` method](../../../../reference/QueryClient/#queryclientinvalidatequeries) and the [Query Client's `setQueryData` method](../../../../reference/QueryClient/#queryclientsetquerydata), mutations become a very powerful tool.
6363

6464
[//]: # 'Info1'
6565

@@ -343,7 +343,7 @@ queryClient.resumePausedMutations()
343343

344344
### Persisting Offline mutations
345345

346-
If you persist offline mutations with the [persistQueryClient plugin](../persistQueryClient), mutations cannot be resumed when the page is reloaded unless you provide a default mutation function.
346+
If you persist offline mutations with the [persistQueryClient plugin](../../plugins/persistQueryClient), mutations cannot be resumed when the page is reloaded unless you provide a default mutation function.
347347

348348
This is a technical limitation. When persisting to an external storage, only the state of mutations is persisted, as functions cannot be serialized. After hydration, the component that triggers the mutation might not be mounted, so calling `resumePausedMutations` might yield an error: `No mutationFn found`.
349349

@@ -386,13 +386,13 @@ export default function App() {
386386

387387
[//]: # 'Example11'
388388

389-
We also have an extensive [offline example](../examples/offline) that covers both queries and mutations.
389+
We also have an extensive [offline example](../../examples/offline) that covers both queries and mutations.
390390

391391
[//]: # 'Materials'
392392

393393
## Further reading
394394

395-
For more information about mutations, have a look at [#12: Mastering Mutations in React Query](../tkdodos-blog#12-mastering-mutations-in-react-query) from
395+
For more information about mutations, have a look at [#12: Mastering Mutations in React Query](../../community/tkdodos-blog#12-mastering-mutations-in-react-query) from
396396
the Community Resources.
397397

398398
[//]: # 'Materials'

0 commit comments

Comments
 (0)