Documents / @faasjs/ant-design / UseFaasOptions
Type Alias: UseFaasOptions<Path>
UseFaasOptions<
Path> =object
Options that customize the useFaas request lifecycle.
Type Parameters
Path
Path extends FaasActionPaths
Registered action path used to infer params and response data.
Properties
baseUrl?
optionalbaseUrl?:BaseUrl
Base URL override used for this request lifecycle.
data?
optionaldata?:FaasData<Path>
Controlled data value used instead of internal hook state.
debounce?
optionaldebounce?:number
Milliseconds to wait before sending the latest request.
params?
optionalparams?:FaasParams<Path>
Controlled params override sent with the request without mutating local params state.
polling?
optionalpolling?:number|false
Milliseconds to wait after each completed request before refreshing data in the background.
setData?
optionalsetData?:React.Dispatch<React.SetStateAction<FaasData<Path>>>
Controlled setter paired with data.
skip?
optionalskip?:boolean| ((params) =>boolean)
Boolean or predicate that suppresses the automatic request.