react-query-kit
react-query-kit copied to clipboard
🕊️ A toolkit for ReactQuery that make ReactQuery hooks reusable and typesafe
Hi, thanks for this amazing library! I'm curious how to use `skipToken` functionality with `createQuery` function options. This is pretty useful for `refetch` preventing if we have our query disabled....
 `const usePost = createQuery({ queryKey: ["posts"], fetcher: (variables: Variables): Promise => { return fetch(`/posts/${variables.id}`).then((res) => res.json()); }, // u can also pass middleware...
I generally use the approach in the code below. ```js import { queryClient } from "@sustable/system"; export const useDeleteUserMutation = createMutation({ mutationKey: ["corporate", "user", "delete"], mutationFn: async (data: IDeleteUserRequest) =>...
Here is a contrived example: ``` type Response = { title: string; content: string; user: User | null; comments: Comments[] | null; likesCount: number | null; } type Variables =...
## Summary I’d like the ability to configure a custom base query hook in place of the default `useQuery` from `@tanstack/react-query`. This would allow teams to define shared defaults and...