UNPKG

@renegade-fi/react

Version:
24 lines 1.03 kB
import { hashFn } from "@renegade-fi/core/query"; import { useInfiniteQuery as tanstack_useInfiniteQuery, useQuery as tanstack_useQuery, useMutation, } from "@tanstack/react-query"; export { useMutation }; // Adding some basic customization. // Ideally we don't have this function, but `import('@tanstack/react-query').useQuery` currently has some quirks where it is super hard to // pass down the inferred `initialData` type because of it's discriminated overload in the on `useQuery`. export function useQuery(parameters) { const result = tanstack_useQuery({ ...parameters, queryKeyHashFn: hashFn, // for bigint support }); result.queryKey = parameters.queryKey; return result; } // Adding some basic customization. export function useInfiniteQuery(parameters) { const result = tanstack_useInfiniteQuery({ ...parameters, queryKeyHashFn: hashFn, // for bigint support }); result.queryKey = parameters.queryKey; return result; } //# sourceMappingURL=query.js.map