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>
Extracted cached async hook
Extends the return type defined by CachedAsyncHookContract.
Used to extract single resources from cached resource colletions to prevent unnecessary requests.