Skip to content

Instantly share code, notes, and snippets.

@bachhm-dev
Last active August 30, 2020 15:05
Show Gist options
  • Save bachhm-dev/cf7531b1d73dbf9b662928b882de9ada to your computer and use it in GitHub Desktop.
Save bachhm-dev/cf7531b1d73dbf9b662928b882de9ada to your computer and use it in GitHub Desktop.
<template>
<div>
<div>Amount: {{ amount }}</div>
<button @click="increaseAmount()">Increase Capacity</button>
</div>
</template>
<script>
import { ref } from "vue";
export default {
setup() {
const amount = ref(3);
function increaseAmount() {
amount.value+=1
}
return { amount, increaseAmount };
}
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment