Skip to content

Commit ba96f0b

Browse files
committed
Merge branch 'main' into rc
# Conflicts: # docs/react/devtools.md # packages/vue-query/package.json # packages/vue-query/src/useBaseQuery.ts
2 parents 52c086b + bd04c70 commit ba96f0b

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Must be one of the following:
8282
- **fix**: A bug fix
8383
- **docs**: Documentation only changes
8484
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
85-
semi-colons, etc)
85+
semicolons, etc.)
8686
- **refactor**: A code change that neither fixes a bug nor adds a feature
8787
- **perf**: A code change that improves performance
8888
- **test**: Adding missing or correcting existing tests

docs/react/guides/does-this-replace-client-state.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ With those points in mind, the short answer is that TanStack Query **replaces th
1212

1313
For a vast majority of applications, the truly **globally accessible client state** that is left over after migrating all of your async code to TanStack Query is usually very tiny.
1414

15-
> There are still some circumstances where an application might indeed have a massive amount of synchronous client-only state (like a visual designer or music production application), in which case, you will probably still want a client state manager. In this situation it's important to note that **TanStack Query is not a replacement for local/client state management**. However, you can use TanStack Query along side most client state managers with zero issues.
15+
> There are still some circumstances where an application might indeed have a massive amount of synchronous client-only state (like a visual designer or music production application), in which case, you will probably still want a client state manager. In this situation it's important to note that **TanStack Query is not a replacement for local/client state management**. However, you can use TanStack Query alongside most client state managers with zero issues.
1616
1717
## A Contrived Example
1818

@@ -38,7 +38,7 @@ const globalState = {
3838
}
3939
```
4040

41-
This also means that with a few hook calls to `useQuery` and `useMutation`, we also get to remove any boilerplate code that was used to manage our server state eg.
41+
This also means that with a few hook calls to `useQuery` and `useMutation`, we also get to remove any boilerplate code that was used to manage our server state e.g.
4242

4343
- Connectors
4444
- Action Creators

packages/vue-query/src/useBaseQuery.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ export type UseBaseQueryReturnType<
2525
TError,
2626
Result = QueryObserverResult<TData, TError>,
2727
> = {
28-
[K in keyof Result]: Result[K] extends (...args: Array<any>) => any
28+
[K in keyof Result]: K extends
29+
| 'fetchNextPage'
30+
| 'fetchPreviousPage'
31+
| 'refetch'
32+
| 'remove'
2933
? Result[K]
30-
: ToRef<Result[K]>
34+
: ToRef<Readonly<Result>[K]>
3135
} & {
3236
suspense: () => Promise<Result>
3337
}

0 commit comments

Comments
 (0)