Skip to content

ยท 1 min read

Methods vs computed in Vue

Originally written as a discussion on dev.to.

Hello ๐Ÿ‘‹๐Ÿผ,

Lately Iโ€™ve been learning Vue. So today I learned about computed property.

In my understanding (please correct me if Iโ€™m wrong), computed is the same as methods property, only it will be re-executed if data that are used within the property are changed. While methods property will be re-executed for any data changes within the page.

In which condition is the best practice to use methods or computed?

Thank you in advance for any help ๐Ÿ˜Š