ModelAdapter class that implements the IModelAdapter interface. It adapts a React.MutableRefObject<Model> and provides methods to interact with the underlying model.
Asynchronously refreshes the current model.
A Promise that resolves when the model has been refreshed.
Sets the data of the variable.
The data to set. It can be a partial object of type T or a function that accepts the previous data and returns a partial object of type T.
Retrieves the current state of the model.
The current state of the model.
Converts the current state of the object to a plain JavaScript object.
The object converted to a plain JavaScript object.
toObject
Retrieves the current data value from the model.
The current data value.
ModelAdapter class that implements the IModelAdapter interface. It adapts a React.MutableRefObject<Model> and provides methods to interact with the underlying model.