Vue Computed Properties

up:: Vue


Use for data that depends on other data. Computed properties are only re-evaluated if one of their “used values” changes.

Work on copies Spread Operator.

Do not change the original reactive object when returning an item. Always use unchanging functions or create a copy with the

Using this, Vue is aware of the dependencies. If you want to output dynamic value that depends on other things, you want to use this.

in app.js

	computed: {
		fullname() {
			// ... logic
			return x;

in index.html

<p>Your Name: {{ fullname }}</p>