tahamajs/IE / Projects /front /node_modules /@tanstack /react-query /build /modern /useSuspenseQueries.js
tahamajs/IE / Projects /front /node_modules /@tanstack /react-query /build /modern /useSuspenseQueries.js
| "use client"; | |
| // src/useSuspenseQueries.ts | |
| import { skipToken } from "@tanstack/query-core"; | |
| import { useQueries } from "./useQueries.js"; | |
| import { defaultThrowOnError } from "./suspense.js"; | |
| function useSuspenseQueries(options, queryClient) { | |
| return useQueries( | |
| { | |
| ...options, | |
| queries: options.queries.map((query) => { | |
| if (process.env.NODE_ENV !== "production") { | |
| if (query.queryFn === skipToken) { | |
| console.error("skipToken is not allowed for useSuspenseQueries"); | |
| } | |
| } | |
| return { | |
| ...query, | |
| suspense: true, | |
| throwOnError: defaultThrowOnError, | |
| enabled: true, | |
| placeholderData: void 0 | |
| }; | |
| }) | |
| }, | |
| queryClient | |
| ); | |
| } | |
| export { | |
| useSuspenseQueries | |
| }; | |
| //# sourceMappingURL=useSuspenseQueries.js.map |
Xet Storage Details
- Size:
- 832 Bytes
- Xet hash:
- 31a1579ea3d54f9f6e3369b3d52d8e0db686cfb582c11a3c9ea0ad6dd6c3e86d
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.