tweetIsOutOfRange: function() { return this.tweetIsEmpty || this.charactersRemaining < 0; }
Your post is fantastic, congrats!
Jozsef Gubicza
532

That could be true, but there could also be the case where the tweet can be empty or if present it must have a minimum size.

Anyway the use of this function is plain wrong, it disables the button but it should just do what it does, warning about an out of range tweet.

The button should be disabled by a function which is named buttonIsDisabled (or the likes) where you could compute the right state composing the functions you need. If you were to need the case where a tweet is valid even if it is composed by just a pic you could implement a photoIsEmpty and change the buttonIsDisabled function. No need to touch the UI.

Anyway this was just a short introduction to Vue, I think he wrote this in this way for the sake of brevity and simplicity.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.