<div id="app">
  <div v-for="item in 3" :key="item" ref="box">{{ item }}</div>
</div>
const { createApp, onMounted, ref } = Vue;

const app = createApp({
  setup() {
    const box = ref([]);

    onMounted(() => {
      console.log('DOM Box:', box.value);
    })

    return {
      box,
    }
  }
});

app.mount('#app');

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://unpkg.com/vue@3