@tanstack/react-query 5.0.0-alpha.3 → 5.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-query",
3
- "version": "5.0.0-alpha.3",
3
+ "version": "5.0.0-alpha.4",
4
4
  "description": "Hooks for managing, caching and syncing asynchronous and remote data in React",
5
5
  "author": "tannerlinsley",
6
6
  "license": "MIT",
@@ -914,15 +914,17 @@ describe('useQueries', () => {
914
914
  }
915
915
 
916
916
  function Page() {
917
- const queries = useQueries({
918
- queries: [
919
- {
920
- queryKey: key,
921
- queryFn,
922
- },
923
- ],
917
+ const queries = useQueries(
918
+ {
919
+ queries: [
920
+ {
921
+ queryKey: key,
922
+ queryFn,
923
+ },
924
+ ],
925
+ },
924
926
  queryClient,
925
- })
927
+ )
926
928
 
927
929
  return <div>data: {queries[0].data}</div>
928
930
  }
package/src/useQueries.ts CHANGED
@@ -155,13 +155,14 @@ export type QueriesResults<
155
155
  : // Fallback
156
156
  UseQueryResult[]
157
157
 
158
- export function useQueries<T extends any[]>({
159
- queries,
160
- queryClient,
161
- }: {
162
- queries: readonly [...QueriesOptions<T>]
163
- queryClient?: QueryClient
164
- }): QueriesResults<T> {
158
+ export function useQueries<T extends any[]>(
159
+ {
160
+ queries,
161
+ }: {
162
+ queries: readonly [...QueriesOptions<T>]
163
+ },
164
+ queryClient?: QueryClient,
165
+ ): QueriesResults<T> {
165
166
  const client = useQueryClient(queryClient)
166
167
  const isRestoring = useIsRestoring()
167
168