UNPKG

zstoreq

Version:

zustand-query is a library that helps you to query You can cal your api and get the data and store it in zustand store

13 lines (12 loc) 334 B
export declare function useQueryZustand<T>(key: string, fetchFn: () => Promise<T>, options?: { staleTime?: number; enabled?: boolean; onError?: (err: any) => void; retry?: boolean | number; }): { data: T | null; error: any; isLoading: boolean; refetch: () => Promise<T>; invalidate: () => void; };