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

enable walking up route hierarchy to trigger onEnter #3197

Conversation

nathanielks
Copy link

I discovered the onEnter route hook isn't triggered whenever navigating back up the route hierarchy. This enables triggering onEnter when navigating from a child branch to a parent branch.

For example, let's take the following routes:

  • /users/:userId
  • /users/:userId/assignments/:assignmentId

Navigating from the latter to the former would not trigger onEnter when entering the route. This PR alleviates that problem! It will trigger onEnter when you enter a parent route from a child route and will not re-trigger it if you click it again.

@taion taion added the wontfix label Mar 18, 2016
@taion
Copy link
Contributor

taion commented Mar 18, 2016

That's intentional – you're not re-entering the parent route. This will be handled by onChange per #3108.

@taion taion closed this Mar 18, 2016
@nathanielks
Copy link
Author

👌

@lock lock bot locked as resolved and limited conversation to collaborators Jan 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants