Array Refs

Learn the difference between array refs in Vue 2 and Vue 3.

We'll cover the following

Vue 2

In Vue 2, if we used a ref attribute with the v-for directive, the $refs property would be populated with an array of refs.

Let’s run the following code and look at the array refs example in Vue 2:

Note: The code below may take a while to run. When the server starts, go to the app URL to see the output.

Get hands-on with 1200+ tech skills courses.