solid-swr-store
Version:
SolidJS bindings for swr-store
10 lines (9 loc) • 545 B
TypeScript
import { Resource } from 'solid-js';
import { MutationResult, SWRStore } from 'swr-store';
export interface UseSWRStoreOptions<T> {
initialData?: T;
shouldRevalidate?: boolean;
hydrate?: boolean;
}
export declare function useSWRStoreSuspenseless<T, P extends any[] = []>(store: SWRStore<T, P>, args: () => P, options: UseSWRStoreOptions<T>): () => MutationResult<T>;
export declare function useSWRStore<T, P extends any[] = []>(store: SWRStore<T, P>, args: () => P, options: UseSWRStoreOptions<T>): Resource<T | undefined>;