UNPKG

solid-swr-store

Version:
10 lines (9 loc) 545 B
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>;