Skip to content

feat(router-core): expose destination location to route lifecycle hooks #7778

Description

@LadyBluenotes

Problem

Route lifecycle hooks receive the route match but not the resolved destination location. Consumers need the destination URL and search state in onEnter, onStay, and onLeave.

Proposal

Add a second callback argument:

  • onEnter(match, { location })
  • onStay(match, { location })
  • onLeave(match, { location })

Supersedes stale #3622 - which targeted an older lifecycle implementation, lacked runtime coverage for onStay and onLeave, and left onLeave typing unresolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationEverything documentation relatedenhancementNew feature or request

    Fields

    No fields configured for Enhancement.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions