How to save new value to data variables in Vue.js whenever the user types? Technology Community › Category: Vue.js › How to save new value to data variables in Vue.js whenever the user types? 0 Vote Up Vote Down VietMX Staff asked 4 years ago Use watch method to detect changes on variable you are storing data on like this: watch: { input: function () { if (isLocalStorage() /* function to detect if localstorage is supported*/) { localStorage.setItem('storedData', this.input) } } }