feat(router-core): expose destination location to route lifecycle hooks
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the router-core lifecycle hook entry points for onEnter, onStay, and onLeave, then trace their callback type definitions. Add the destination location to each callback's second argument and cover the runtime behavior and typing for all three hooks. Done means consumers can read the resolved URL and search state consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100