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

Is swrv changed setTimeout in somewhere to make `await setTimeout` work?

jcc1997 opened this issue · comments

commented

swrv/src/use-swrv.ts

Lines 291 to 295 in bea4e30

await setTimeout(async () => {
if (!unmounted) {
await trigger()
}
}, config.revalidateDebounce)

I'm not sure I understand your question?

commented

setTimeout seems not return promise. why await setTimeout here?