Documents / @faasjs/react / FaasDataInjection
Type Alias: FaasDataInjection<PathOrData>
FaasDataInjection<
PathOrData
>:object
Injects FaasData props.
Type Parameters
• PathOrData extends FaasAction
= any
Type declaration
action
action:
PathOrData
|string
data
data:
FaasData
<PathOrData
>
error
error:
any
loading
loading:
boolean
params
params:
Record
<string
,any
>
promise
reloadTimes
reloadTimes:
number
setData
setData:
React.Dispatch
<React.SetStateAction
<FaasData
<PathOrData
>>>
setError
setError:
React.Dispatch
<React.SetStateAction
<any
>>
setLoading
setLoading:
React.Dispatch
<React.SetStateAction
<boolean
>>
setPromise
setPromise:
React.Dispatch
<React.SetStateAction
<Promise
<Response
<FaasData
<PathOrData
>>>>>
reload()
Reloads data with new or existing parameters.
Note: It will sets skip to false before loading data.
Parameters
• params?: Record
<string
, any
>
Returns
Promise
<Response
<PathOrData
>>