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

BugFix: stop watchers during the beforeRouteLeave lifecycle #112

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

pleek91
Copy link
Collaborator

@pleek91 pleek91 commented Oct 17, 2022

Description

Currently the useRouteQueryParam uses two watchers. Those watcher run until the component's unmounted hook runs, which is actually after the route changes. Using the beforeRouteLeave hook from vue-router ensures that these watchers are stopped prior to the route changing.

Fix fixes a bug where query params would stick around when navigating way from a route.

@pleek91 pleek91 merged commit 7b8ee5a into main Oct 17, 2022
@pleek91 pleek91 deleted the unmount-watchers branch October 17, 2022 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants