Skip to main content

Variable: customRef

const customRef: <T>(modelTypeId, options) => RefConstructor<T>;

Creates a custom ref to an object, which in its snapshot form has an id.

Type Parameters​

Type ParameterDescription
T extends objectTarget object type.

Parameters​

ParameterTypeDescription
modelTypeIdstringUnique model type id.
optionsCustomRefOptions<T>Custom reference options.

Returns​

RefConstructor<T>

A function that allows you to construct that type of custom reference.