Level 2 of 3 · collections, nested state and raw objects
Arrays and objects
Pushes, index writes, Sets, snapshots and the raw object behind a proxy.0 / 8
<script setup>const items = ref(['Vue']) function add() { items.value.push('Pinia')}</script> <template> <p>{{ items.length }}</p> <button @click="add">Add</button></template>Preview
1
The user clicks Add. Does the page update?