Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10 - Lifecycle Hooks #2826

Open
wail-hammani opened this issue Oct 24, 2024 · 0 comments
Open

10 - Lifecycle Hooks #2826

wail-hammani opened this issue Oct 24, 2024 · 0 comments

Comments

@wail-hammani
Copy link

//The problem here is that we're setting a new interval evry time we mount the child component. So, we jus need to specify how //the app must behave when we unMount the child component and clear the interval at this point.
onUnmounted(() => {
  clearInterval(timer.value);
})
//if we want to reset the counter each time we can reset count.value to 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant