Created
August 6, 2019 06:07
-
-
Save parzibyte/20822eef825d3fee884c911767889e50 to your computer and use it in GitHub Desktop.
Watch en Vue.JS 2 - https://parzibyte.me/blog/2018/11/05/watch-vue-js-2/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = new Vue({ | |
el: "#app", | |
data: () => ({ | |
nombre: "", | |
}), | |
watch: { | |
nombre(nuevoValor, valorAnterior){ | |
console.log("El nombre pasó de ser '%s' a '%s'", valorAnterior, nuevoValor); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment