vue-swr-plus
Version:
SWR (stale-while-revalidate) for Vue
12 lines (11 loc) • 325 B
TypeScript
import { Ref } from 'vue';
interface SWROptions {
fetcher: (...args: any[]) => Promise<any>;
initialData?: any;
}
export declare function useSWR(key: string, options: SWROptions): {
data: Ref<any, any>;
error: Ref<Error | null, Error | null>;
isValidating: Ref<boolean, boolean>;
};
export {};