import MyButton from "ladariha-button/src/components/MyButton.vue";
<template>
<div id="app">
<MyButton />
Reactive number: {{ randomNumber }}
</div>
</template>
<script lang="ts">
import MyButton from "ladariha-button/src/components/MyButton.vue";
import { defineComponent, ref } from "@vue/composition-api";
export default defineComponent({
name: "App",
components: {
MyButton,
},
setup() {
const randomNumber = ref(Math.random());
setInterval(() => {
randomNumber.value = Math.random();
}, 3000);
return { randomNumber };
},
});
</script>