Reactive object to watch.
Optional
debounce: numberDebounce time in ms.
const form = reactive({ verified: false });
const history = watch(form);
form.name = 'John';
// Logs: { name: 'John' }
console.log(history.changes);
Undo the changes.
const form = reactive({ verified: false });
const history = watch(form);
form.name = 'Smith';
// Logs: { name: 'Smith' }
console.log(history.changes);
history.undo();
// Logs: {}
console.log(history.changes);
Generated using TypeDoc
Watch the changed properties of a
State
(Reactive object).