Kong/swrv

Omitting fetcher function argument is ambiguous?

開放

#148 建立於 2021年3月21日

 (6 則留言) (0 個反應) (0 位負責人)TypeScript (77 個分叉)github user discovery
help wanted

倉庫指標

星標
 (2,280 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

The README states:

Note that fetcher can be any asynchronous function, so you can use your favorite data-fetching library to handle that part. If ommitted, swrv uses the Fetch api.

But later also:

To only retrieve a swrv cache response without revalidating, you can omit the fetcher function from the useSWRV call.

So, which one is it? :) Or am I misunderstanding what omitting means in the first case?

貢獻者指南