---
url: /docs/guide/usage/linter/rules/vue/no-deprecated-props-default-this.md
---

### What it does

Disallow deprecated `this` access in props default function (in Vue.js 3.0.0+).

### Why is this bad?

In Vue.js 3.0.0+, props default factory functions no longer have access to
`this`. They are invoked before the component instance is created, so
`this` is `undefined`. The factory should rely on its first argument (the
raw props passed by the parent) instead.

### Examples

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

```vue
<script>
export default {
  props: {
    a: String,
    b: {
      default() {
        return this.a;
      },
    },
  },
};
</script>
```

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

```vue
<script>
export default {
  props: {
    a: String,
    b: {
      default(props) {
        return props.a;
      },
    },
  },
};
</script>
```

## How to use

## Version

This rule was added in v1.67.0.

## References
