Kong/swrv

Omitting fetcher function argument is ambiguous?

Open

#148 opened on Mar 21, 2021

 (6 comments) (0 reactions) (0 assignees)TypeScript (77 forks)github user discovery
help wanted

Repository metrics

Stars
 (2,280 stars)
PR merge metrics
 (PR metrics pending)

Description

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?

Contributor guide