Skip to content

Commit 1d0d4ff

Browse files
authored
Update README.md (#411)
1 parent 3cd2fef commit 1d0d4ff

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
@@ -429,7 +429,7 @@ Keep in mind these are completely optional. To use but showcase the power of our
429429
To prevent duplicate fetching and to trigger handle refetching we provide a cache api. That takes a function and returns the same function.
430430

431431
```jsx
432-
const getUser = cache((id) => {
432+
const getUser = cache(async (id) => {
433433
return (await fetch(`/api/users${id}`)).json()
434434
}, "users") // used as cache key + serialized arguments
435435
```

0 commit comments

Comments
 (0)