Skip to content
Permalink
Browse files

Vue Lifecycle Hooks

  • Loading branch information
Juan
Juan committed Mar 10, 2020
1 parent 8e5ffd1 commit e5c5664fcaa58f94ffcf996ddad578e8384d2613
Showing with 38 additions and 0 deletions.
  1. +38 −0 src/App.vue
@@ -7,6 +7,17 @@
</template>

<script>
import {
onBeforeMount,
onMounted,
onBeforeUpdate,
onUpdated,
onBeforeUnmount,
onUnmounted,
onActivated,
onDeactivated,
onErrorCaptured
} from "@vue/composition-api";
import useTasksSpace from "./use/tasksSpace.js";
import AppTaskList from "./components/AppTaskList.vue";
import AppTaskSearch from "./components/AppTaskSearch.vue";
@@ -15,6 +26,33 @@ import AppTaskAdd from "./components/AppTaskAdd.vue";
export default {
name: "app",
setup() {
onBeforeMount(() => {
console.log("Before Mount!");
});
onMounted(() => {
console.log("Mounted!");
});
onBeforeUpdate(() => {
console.log("Before Update!");
});
onUpdated(() => {
console.log("Updated!");
});
onBeforeUnmount(() => {
console.log("Before Unmount!");
});
onUnmounted(() => {
console.log("Unmounted!");
});
onActivated(() => {
console.log("Activated!");
});
onDeactivated(() => {
console.log("Deactivated!");
});
onErrorCaptured(() => {
console.log("Error Captured!");
});
return { ...useTasksSpace() };
},
components: {

0 comments on commit e5c5664

Please sign in to comment.
You can’t perform that action at this time.