Skip to content

useObject404 ​

Overview ​

A composable function for handling a 404 error on an ObjectInstance, given the props and model config, and updating a passed error ref.

Signature ​

useObject404(yourProps, yourInstanceObject, yourModelConfig, yourErrorRef)

Parameters ​

NameTypeRequiredDescription
yourPropsobjectyesThe props object.
yourInstanceObjectObjectInstanceyesThe object instance.
yourModelConfigobjectyesThe model config.
yourErrorRefRefyesThe error ref.

yourProps Properties ​

NameTypeRequiredDefaultDescription
pkstring

yourModelConfig Properties ​

NameTypeRequiredDefaultDescription
appstringThe app name being used.
clearError() => voidClear the error.
configobjectThe model config.
effectScopeobjectThe effect scope for the instance.
errorErrorThe error that occurred while loading the model config.
erroredbooleanTrue if an error occurred while loading the model config.
infoobjectThe model info.
loadingbooleanTrue if the model config is loading.
modelstringThe model name being used.
viewstringThe view being used, if any.

Returns ​

void

Source ​

client/lib/use/useObject404.js:21