UseSubmitOptionsType
Import
import { UseSubmitOptionsType } from "@hyper-fetch/react"
Source
Package
Preview
type UseSubmitOptionsType<T,TSelected> = { bounce?: boolean; deepCompare?: (boolean | typeof isEqual); dependencyTracking?: boolean; disabled?: boolean; initialResponse?: NullableType<Partial<ExtractAdapterResolvedType<T>>>; select?: UseTrackedStateSelect<T, TSelected>; structuralSharing?: boolean } & ({ 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. |
| structuralSharing | | Keep references of the unchanged parts of the selected data between updates (default true). |
| select | | Pick or transform the part of the response data used by the component.
Callbacks like
|

