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

fix(Link): Use currentTransitionStack to enable auto-tracking #394

Merged
merged 1 commit into from
Aug 6, 2020

Conversation

Turbo87
Copy link
Collaborator

@Turbo87 Turbo87 commented Aug 4, 2020

currentURL appears to update when the transition starts, but not anymore when it has ended. This leads to isActive not updating correctly if the model() hook is taking too long to load data. The currentTransitionStack however is changing in the routeDidChange event handler, which ensures that isActive (and friends) are updating at the right time.

If I understand the issue correctly, this should resolve #42.

`currentURL` appears to update when the transition starts, but not anymore when it has ended. This leads to `isActive` not updating correctly if the `model()` hook is taking too long to load data. The `currentTransitionStack` however is changing in the `routeDidChange` event handler, which ensures that `isActive` (and friends) are updating at the right time.
Copy link
Owner

@buschtoens buschtoens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you. 💝

I wish we had proper tests for #42, but we can add them later. And since this PR doesn't break anything, it's shipping time. 🚢 😄

@buschtoens buschtoens changed the title Link: Use currentTransitionStack to enable auto-tracking fix(Link): Use currentTransitionStack to enable auto-tracking Aug 6, 2020
@buschtoens buschtoens merged commit 37319f9 into buschtoens:master Aug 6, 2020
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.

Including a loading substate seems to break isActive
2 participants