Nuxt/test/fixtures/basic/composables/keep-alive.ts

7 lines
279 B
TypeScript

export function useLifecyleLogs (name: string) {
onMounted(() => console.log(`${name}: onMounted`))
onUnmounted(() => console.log(`${name}: onUnmounted`))
onActivated(() => console.log(`${name}: onActivated`))
onDeactivated(() => console.log(`${name}: onDeactivated`))
}