Kong/swrv

Omitting fetcher function argument is ambiguous?

オープン

#148 opened on 2021/03/21

 (6 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (77 件のフォーク)github user discovery
help wanted

Repository metrics

Stars
 (2,280 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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?

コントリビューターガイド