JavaScript

JavaScript

Made by DeepSource

Use head property in component as a function JS-W1013

Bug risk
Major
Autofix

It is recommended to use head as a function as it provides access to more data through this.

Bad Practice

export default {
  head: {
    title: "My page"
  }
}

Recommended

export default {
  head() {
    return {
      title: this.title
    }
  }
}