Kong / swrv

Stale-while-revalidate data fetching for Vue

Home Page:https://docs-swrv.netlify.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(Feature Request) Pass ref object as key directly

luminisward opened this issue · comments

const params = ref('1')
const { data } = useSWRV(params, fetcher)

It works fine, just has a type error.

export declare type IKey = keyFunction | keyType | WatchSource<keyType>;

Append WatchSource to IKey to resolve.

sounds like it's just a typing issue? Do you feel up to submitting a PR?

sounds like it's just a typing issue? Do you feel up to submitting a PR?

No problem. I have created a PR.

closed by #238 thanks @luminisward !