Vue computed properties

Viewed 114

If I need to access a computed property 20 times in one function, is it better to assign the value of it to a local variable first?

Would that improve performance?

1 Answers

Computed properties are cached based on their reactive dependencies ... Computed Caching vs Methods

Vue.js automatically cache the computed value, as long as their reactive dependencies don't mutate.

Storing it in a variable would be counter-intuitive.

Related