You can try:
this.oldForm = JSON.parse(JSON.stringify(this.form));
This is what I am using for my applications to remove the "reactiveness".
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I want to have the ability to allow users to cancel a form change and revert back to the original form data. Whenever i assign old Data to the existing data i.e.
this.oldForm = this.form
the oldForm stays reactive to changes that occur in this.form. So if the user changes this.form.... this.oldForm is also updated.
is there a way to copy the original form data so it wont be reactive?
Please or to participate in this conversation.