Skip to content

Commit d486197

Browse files
committed
Merge remote-tracking branch 'origin/main' into refactor/resolveValueOrFunction
2 parents 63730f0 + 6a85584 commit d486197

File tree

196 files changed

+5310
-7331
lines changed

Some content is hidden

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

196 files changed

+5310
-7331
lines changed

.github/labeler.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/labeler.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ name: Labeler
33
on:
44
- pull_request_target
55

6+
permissions:
7+
contents: read
8+
pull-requests: write
9+
610
jobs:
7-
triage:
11+
labeler:
812
runs-on: ubuntu-latest
913
steps:
10-
- uses: actions/labeler@v4.3.0
14+
- uses: actions/labeler@v5.0.0
1115
with:
1216
repo-token: ${{ secrets.GITHUB_TOKEN }}
17+
configuration-path: labeler-config.yml

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
run: |
6666
echo "COMMIT_SHA=${{ github.event.pull_request.head.sha || github.sha }}" >> $GITHUB_ENV
6767
- name: Preview Bundle Size
68-
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728
68+
uses: marocchino/sticky-pull-request-comment@28d58c4b5a5eae3bbe45348c3990dcbc2ffcdc69
6969
with:
7070
message: |
7171
Sizes for commit ${{ env.COMMIT_SHA }}:

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
24.2.0
1+
24.4.1

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ If you are here to suggest a feature, first create an issue if it does not alrea
1414

1515
## Development
1616

17+
_TanStack/query uses **symlink-based** configuration files. For smooth development in a local environment, we recommend developing in an environment that supports symlinks(ex: Linux, macOS, Windows Subsystem for Linux / WSL)._
18+
1719
If you have been assigned to fix an issue or develop a new feature, please follow these steps to get started:
1820

1921
- Fork this repository.

docs/config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@
459459
},
460460
{
461461
"label": "Does this replace state managers?",
462-
"to": "framework/angular/guides/does-this-replace-client-state"
462+
"to": "framework/solid/guides/does-this-replace-client-state"
463463
}
464464
]
465465
},
@@ -819,6 +819,10 @@
819819
"label": "infiniteQueryOptions",
820820
"to": "framework/react/reference/infiniteQueryOptions"
821821
},
822+
{
823+
"label": "mutationOptions",
824+
"to": "framework/react/reference/mutationOptions"
825+
},
822826
{
823827
"label": "usePrefetchQuery",
824828
"to": "framework/react/reference/usePrefetchQuery"

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Out of the box, TanStack Query is configured with **aggressive but sane** defaul
1010
> To change this behavior, you can configure your queries both globally and per-query using the `staleTime` option. Specifying a longer `staleTime` means queries will not refetch their data as often
1111
1212
- A Query that has a `staleTime` set is considered **fresh** until that `staleTime` has elapsed.
13-
1413
- set `staleTime` to e.g. `2 * 60 * 1000` to make sure data is read from the cache, without triggering any kinds of refetches, for 2 minutes, or until the Query is [invalidated manually](../query-invalidation.md).
1514
- set `staleTime` to `Infinity` to never trigger a refetch until the Query is [invalidated manually](../query-invalidation.md).
1615
- set `staleTime` to `'static'` to **never** trigger a refetch, even if the Query is [invalidated manually](../query-invalidation.md).

docs/framework/react/guides/optimistic-updates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ If the mutation errors, the item will also disappear. But we could continue to s
6060

6161
### If the mutation and the query don't live in the same component
6262

63-
This approach works very well if the mutation and the query live in the same component, However, you also get access to all mutations in other components via the dedicated `useMutationState` hook. It is best combined with a `mutationKey`:
63+
This approach works very well if the mutation and the query live in the same component. However, you also get access to all mutations in other components via the dedicated `useMutationState` hook. It is best combined with a `mutationKey`:
6464

6565
[//]: # 'ExampleUI4'
6666

docs/framework/react/quick-start.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ function Todos() {
5353

5454
return (
5555
<div>
56-
<ul>{query.data?.map((todo) => <li key={todo.id}>{todo.title}</li>)}</ul>
56+
<ul>
57+
{query.data?.map((todo) => (
58+
<li key={todo.id}>{todo.title}</li>
59+
))}
60+
</ul>
5761

5862
<button
5963
onClick={() => {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
id: mutationOptions
3+
title: mutationOptions
4+
---
5+
6+
```tsx
7+
mutationOptions({
8+
mutationFn,
9+
...options,
10+
})
11+
```
12+
13+
**Options**
14+
15+
You can generally pass everything to `mutationOptions` that you can also pass to [`useMutation`](../useMutation.md).

0 commit comments

Comments
 (0)