Skip to content

Commit

Permalink
docs: add isPaused() into the options
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 committed Jan 11, 2021
1 parent 74fa3b2 commit 68051ed
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ const { data, error, isValidating, mutate } = useSWR(key, fetcher, options)
- `onError(err, key, config)`: callback function when a request returns an error
- `onErrorRetry(err, key, config, revalidate, revalidateOps)`: handler for [error retry](#error-retries)
- `compare(a, b)`: comparison function used to detect when returned data has changed, to avoid spurious rerenders. By default, [`dequal/lite`](https://github.com/lukeed/dequal) is used.
- `isPaused()`: function to detect whether pause revalidations, will ignore fetched data and errors when it returns `true`. Returns `false` by default.

When under a slow network (2G, <= 70Kbps), `errorRetryInterval` will be 10s, and
`loadingTimeout` will be 5s by default.
Expand Down

0 comments on commit 68051ed

Please sign in to comment.