---
url: /docs/guide/usage/linter/rules/vue/no-side-effects-in-computed-properties.md
---

### What it does

Disallow side effects in computed properties.

### Why is this bad?

It is considered a very bad practice to introduce side effects inside computed properties.
It makes the code unpredictable and hard to understand.

### Examples

Examples of **incorrect** code for this rule:

```vue
<script>
export default {
  computed: {
    fullName() {
      this.firstName = "lorem"; // side effect
      return `${this.firstName} ${this.lastName}`;
    },
  },
};
</script>
```

Examples of **correct** code for this rule:

```vue
<script>
export default {
  computed: {
    fullName() {
      return `${this.firstName} ${this.lastName}`;
    },
  },
};
</script>
```

## How to use

## Version

This rule was added in v1.70.0.

## References
