DEV Community

Discussion on: A Complete Beginner's Guide to Vue

georgehanson profile image
George Hanson

Nice article! :)

You could also replace charactersRemaining with a computed property instead. That way you don't need a method to update the value or store it in the data object. For example, you could do this:

computed: {
  charactersRemaining() {
    return 280 - this.commentText.length
aspittel profile image
Ali Spittel Author

Totally, I did this for a workshop and I wanted two methods.