Skip to content

Instantly share code, notes, and snippets.

@bachhm-dev
Last active August 30, 2020 15:42
Show Gist options
  • Save bachhm-dev/3fa3b05765d77e28b54e976e0d81e8d7 to your computer and use it in GitHub Desktop.
Save bachhm-dev/3fa3b05765d77e28b54e976e0d81e8d7 to your computer and use it in GitHub Desktop.
<template>
<div>
<input type="text" v-model="name" />
</div>
</template>
<script>
import { ref, watchEffect } from "vue";
export default {
setup() {
const name = ref('');
watchEffect(() => {
console.log(name.value);
})
return { name };
}
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment