UseSubmitOptionsType
Import
import { UseSubmitOptionsType } from "@hyper-fetch/react"
Source
Package
Preview
type UseSubmitOptionsType<T> = { bounce?: boolean; deepCompare?: (boolean | typeof isEqual); dependencyTracking?: boolean; disabled?: boolean; initialResponse?: NullableType<Partial<ExtractAdapterResolvedType<T>>> } & ({ bounceTime?: number; bounceType?: debounce } | { bounceTime?: number; bounceTimeout?: number; bounceType: throttle });
Structure
UseSubmitOptionsType
| Name | Type | Description |
|---|---|---|
| bounce | | Enable/disable debouncing for often changing keys or refreshing, to limit requests to server. |
| deepCompare | | Deep comparison function for hook to check for equality in incoming data, to limit rerenders. |
| dependencyTracking | | If
|
| disabled | | Disable submitting |
| initialResponse | | If cache is empty we can use placeholder data. |