docs: clarify enter and stay causes for parameter changes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.1k
- Forks
- 1.9k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 143
Description
The cause value passed to beforeLoad and loader is currently listed as enter, stay, or preload, but the docs do not explain what distinguishes enter from stay.
This is easy to misread when navigating between parameter values. For example, moving from /somepath/one to /somepath/hello%20world creates a different match ID, but the same route remains active, so the cause is stay.
It would help to clarify that:
entermeans the route ID has newly entered the active route tree.staymeans the route ID remains active, including when path params or loader dependencies change.preloadapplies to preloading work.
That should make it clearer when to use cause for route lifecycle behavior versus match-specific behavior.
Related Work: #3660
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
Search the documentation for the sections describing the cause value passed to beforeLoad and loader, and read the surrounding route lifecycle guidance. Clarify how enter, stay, and preload differ, including parameter changes that keep the same route ID active, then verify the updated wording against the example in this issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100