Documents / @faasjs/react / FaasReactClientOptions
Type Alias: FaasReactClientOptions
FaasReactClientOptions =
object
Options for creating a FaasReactClient instance.
Properties
baseUrl?
optionalbaseUrl?:BaseUrl
Base URL used as the registry key for this client and as the default prefix
for bound faas and useFaas calls.
Default
/
onError?
optionalonError?:OnError
Error hook invoked when faas or useFaas receives a failed response.
Example
import { ResponseError } from '@faasjs/react'
onError: (action, params) => async (res) => {
if (res instanceof ResponseError) {
reportErrorToSentry(res, {
tags: { action },
extra: { params },
})
}
}
options?
optionaloptions?:Options
Default request options forwarded to the underlying browser client.