Why isn’t there a parenthesis when executing the tweetIsEmpty() function?
Ikechi Michael
13

Computed properties, though implemented as functions, can be thought of as getters (you can create setters for them too, optionally). Under the hood, a function is called, but the template code doesn’t need to know if the property is real or computed.

There’s a separate code block in Vue components, `methods {}`, where you can put functions you want to call explicitly with some arguments.

One of the things I like about Vue is that everything has a clean “place” in the component… template markup, Javascript, and CSS all have their areas, and within the Javascript area, each part of the component’s code (data, computed, methods, watch, directives, mixins, etc.) is coded in its own key in the object.

One clap, two clap, three clap, forty?

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