What is the logical way to send an axios http put request only if there is a change on the object and its properties?
I'm finding that I am firing unnecessary http requests which is a waste on the server power. I would like to limit to only firing if the object I am sending has been updated or changed from the original version when the page loaded.
My main reason for this is that I am using automatic saving on input via @blur and therefore there is a lot of action happening on the http front!
<input @blur="editInput()"></input>
The method editInput()
fires axios put http request every time. Needs a method to check for change?
Do you clone the object on the created()
hook perhaps? And then use some method to compare... was what I attempted but failed.