Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update options.en-US.mdx #304

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pages/docs/options.en-US.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import Callout from 'nextra-theme-docs/callout'
# API Options

```js
const { data, error, isValidating, mutate } = useSWR(key, fetcher, options)
const { data, error, isValidating, mutate } = useSWR(key, fetcher, config)
```

## Parameters

- `key`: a unique key string for the request (or a function / array / null) [(advanced usage)](/docs/conditional-fetching)
- `fetcher`: (_optional_) a Promise returning function to fetch your data [(details)](/docs/data-fetching)
- `options`: (_optional_) an object of options for this SWR hook
- `config`: (_optional_) an object of options for this SWR hook

## Return Values

Expand All @@ -19,7 +19,7 @@ const { data, error, isValidating, mutate } = useSWR(key, fetcher, options)
- `isValidating`: if there's a request or revalidation loading
- `mutate(data?, shouldRevalidate?)`: function to mutate the cached data [(details)](/docs/mutation)

## Options
## Config Options

- `suspense = false`: enable React Suspense mode [(details)](/docs/suspense)
- `fetcher(args)`: the fetcher function
Expand Down