The guidance in Vue 3 documentation and in folk literature is that ref()
is for scalars and primitives, while reactive()
is for Objects.
However, in JavaScript, arrays are a special case of Object. Notwithstanding issues such as monitoring nested object elements for new property additions and other wrinkles, is there a best practice on whether to handle arrays as ref
or reactive
, whether from a performance perspective or any other?