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>
Infinite cached async hook
Extends the return type defined by CachedAsyncHookContract and useSWRInfinite
Defines the result of a paginated response. This can be used just like the regular CachedAsyncHookContract. It exposes an additional property called
pagination
that contains the pagination metadata: PaginationMeta.Note that if no pagination params is specified in the fetcher hook, e.g. useEvents, the resulting data will use the default page amount {@link DEFAULT_PAGE_AMOUNT}.