[Vuejs]-What is the benefit of using a ref on a service?

0👍

Ref object is used for the cases when a value is reassigned in other place and can be read in another place, the pattern makes use of the fact that objects are passed by reference rather than by value in JavaScript.

Since productService value is never changed, there’s no benefit from using a ref.

Leave a comment