Skip to content

Commit 906e53a

Browse files
authored
Fix README.md typo (#783)
'/api/data' => '/api/user' in "Multiple Arguments"
1 parent 5e48f4b commit 906e53a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ In some scenarios, it's useful to pass multiple arguments (can be any value or o
273273
useSWR('/api/user', url => fetchWithToken(url, token))
274274
```
275275

276-
This is **incorrect**. Because the identifier (also the index of the cache) of the data is `'/api/data'`,
276+
This is **incorrect**. Because the identifier (also the index of the cache) of the data is `'/api/user'`,
277277
so even if `token` changes, SWR will still have the same key and return the wrong data.
278278

279279
Instead, you can use an **array** as the `key` parameter, which contains multiple arguments of `fetcher`:

0 commit comments

Comments
 (0)