mutate
mutate: (data?: T | Promise<T>, shouldRevalidate?: boolean) => Promise<undefined | T>
Type declaration
-
- (data?: T | Promise<T>, shouldRevalidate?: boolean): Promise<undefined | T>
-
Parameters
-
Optional data: T | Promise<T>
-
Optional shouldRevalidate: boolean
Returns Promise<undefined | T>
Cached async hook
Extends the return type defined by
useSWR
.For more information about
useSWR
:SWR Documentation