DEV Community

Discussion on: A Complete Beginner's Guide to Vue

Collapse
 
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
  }
}
Collapse
 
aspittel profile image
Ali Spittel

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