Skip to content

Commit 5e32e96

Browse files
committed
wip - 1
1 parent 565a241 commit 5e32e96

File tree

11 files changed

+15
-15
lines changed

11 files changed

+15
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ 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)
106+
- [QueryErrorResetBoundary](../reference/QueryErrorResetBoundary)
107107
- [useQueryErrorResetBoundary](../useQueryErrorResetBoundary)
108108

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

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

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

497497
[//]: # 'FrameworkSpecificNewFeatures'
498498

docs/framework/react/guides/mutations.md

Lines changed: 1 addition & 1 deletion
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](../QueryClient#queryclientinvalidatequeries) and the [Query Client's `setQueryData` method](../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

docs/framework/react/guides/prefetching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ Integration with other routers is also possible, see the [React Router example](
426426

427427
## Manually Priming a Query
428428

429-
If you already have the data for your query synchronously available, you don't need to prefetch it. You can just use the [Query Client's `setQueryData` method](../QueryClient#queryclientsetquerydata) to directly add or update a query's cached result by key.
429+
If you already have the data for your query synchronously available, you don't need to prefetch it. You can just use the [Query Client's `setQueryData` method](../../../reference/QueryClient/#queryclientsetquerydata) to directly add or update a query's cached result by key.
430430

431431
[//]: # 'ExampleManualPriming'
432432

docs/framework/react/guides/ssr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ On the server, `gcTime` defaults to `Infinity` which disables manual garbage col
548548

549549
Avoid setting `gcTime` to `0` as it may result in a hydration error. This occurs because the [Hydration Boundary](../hydration#hydrationboundary) places necessary data into the cache for rendering, but if the garbage collector removes the data before the rendering completes, issues may arise. If you require a shorter `gcTime`, we recommend setting it to `2 * 1000` to allow sufficient time for the app to reference the data.
550550

551-
To clear the cache after it is not needed and to lower memory consumption, you can add a call to [`queryClient.clear()`](../QueryClient#queryclientclear) after the request is handled and dehydrated state has been sent to the client.
551+
To clear the cache after it is not needed and to lower memory consumption, you can add a call to [`queryClient.clear()`](../../../reference/QueryClient/#queryclientclear) after the request is handled and dehydrated state has been sent to the client.
552552

553553
Alternatively, you can set a smaller `gcTime`.
554554

docs/framework/react/guides/updates-from-mutation-responses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ id: updates-from-mutation-responses
33
title: Updates from Mutation Responses
44
---
55

6-
When dealing with mutations that **update** objects on the server, it's common for the new object to be automatically returned in the response of the mutation. Instead of refetching any queries for that item and wasting a network call for data we already have, we can take advantage of the object returned by the mutation function and update the existing query with the new data immediately using the [Query Client's `setQueryData`](../QueryClient#queryclientsetquerydata) method:
6+
When dealing with mutations that **update** objects on the server, it's common for the new object to be automatically returned in the response of the mutation. Instead of refetching any queries for that item and wasting a network call for data we already have, we can take advantage of the object returned by the mutation function and update the existing query with the new data immediately using the [Query Client's `setQueryData`](../../../reference/QueryClient/#queryclientsetquerydata) method:
77

88
[//]: # 'Example'
99

docs/framework/react/plugins/persistQueryClient.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ ReactDOM.createRoot(rootElement).render(<App />)
180180

181181
### PersistQueryClientProvider
182182

183-
For this use-case, you can use the `PersistQueryClientProvider`. It will make sure to subscribe / unsubscribe correctly according to the React component lifecycle, and it will also make sure that queries will not start fetching while we are still restoring. Queries will still render though, they will just be put into `fetchingState: 'idle'` until data has been restored. Then, they will refetch unless the restored data is _fresh_ enough, and _initialData_ will also be respected. It can be used _instead of_ the normal [QueryClientProvider](../QueryClientProvider):
183+
For this use-case, you can use the `PersistQueryClientProvider`. It will make sure to subscribe / unsubscribe correctly according to the React component lifecycle, and it will also make sure that queries will not start fetching while we are still restoring. Queries will still render though, they will just be put into `fetchingState: 'idle'` until data has been restored. Then, they will refetch unless the restored data is _fresh_ enough, and _initialData_ will also be respected. It can be used _instead of_ the normal [QueryClientProvider](../reference/QueryClientProvider):
184184

185185
```tsx
186186
import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client'
@@ -210,14 +210,14 @@ ReactDOM.createRoot(rootElement).render(
210210

211211
#### Props
212212

213-
`PersistQueryClientProvider` takes the same props as [QueryClientProvider](../QueryClientProvider), and additionally:
213+
`PersistQueryClientProvider` takes the same props as [QueryClientProvider](../reference/QueryClientProvider), and additionally:
214214

215215
- `persistOptions: PersistQueryClientOptions`
216216
- all [options](#options) you can pass to [persistQueryClient](#persistqueryclient) minus the QueryClient itself
217217
- `onSuccess?: () => Promise<unknown> | unknown`
218218
- optional
219219
- will be called when the initial restore is finished
220-
- can be used to [resumePausedMutations](../QueryClient#queryclientresumepausedmutations)
220+
- can be used to [resumePausedMutations](../../../reference/QueryClient/#queryclientresumepausedmutations)
221221
- if a Promise is returned, it will be awaited; restoring is seen as ongoing until then
222222

223223
### useIsRestoring

docs/framework/react/reference/useInfiniteQuery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const {
2929
The options for `useInfiniteQuery` are identical to the [`useQuery` hook](../useQuery) with the addition of the following:
3030

3131
- `queryFn: (context: QueryFunctionContext) => Promise<TData>`
32-
- **Required, but only if no default query function has been defined** [`defaultQueryFn`](../default-query-function)
32+
- **Required, but only if no default query function has been defined** [`defaultQueryFn`](../../guides/default-query-function)
3333
- The function that the query will use to request data.
3434
- Receives a [QueryFunctionContext](../query-functions#queryfunctioncontext)
3535
- Must return a promise that will either resolve data or throw an error.

docs/framework/react/reference/useQuery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const {
6666
- The query key will be hashed into a stable hash. See [Query Keys](../query-keys) for more information.
6767
- The query will automatically update when this key changes (as long as `enabled` is not set to `false`).
6868
- `queryFn: (context: QueryFunctionContext) => Promise<TData>`
69-
- **Required, but only if no default query function has been defined** See [Default Query Function](../default-query-function) for more information.
69+
- **Required, but only if no default query function has been defined** See [Default Query Function](../../guides/default-query-function) for more information.
7070
- The function that the query will use to request data.
7171
- Receives a [QueryFunctionContext](../query-functions#queryfunctioncontext)
7272
- Must return a promise that will either resolve data or throw an error. The data cannot be `undefined`.

0 commit comments

Comments
 (0)