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 Parameter | Description |
|---|---|
T extends object | Target object type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
modelTypeId | string | Unique model type id. |
options | CustomRefOptions<T> | Custom reference options. |
Returns
A function that allows you to construct that type of custom reference.