<script setup>
  import { ref } from 'vue';

  const user = ref({
    name: 'Ray',
    url: 'https://israynotarray.com',
    address: {
      city: 'Kaohsiung',
      country: 'Taiwan'
    }
  });

  const updateAddress = () => {
    user.value.address.city = 'Taipei';
  }
</script>

<template>
<div>
  <p>city:{{ user.address.city }}</p>
  <button @click="updateAddress">Update Address</button>
  </div>
</template>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.