Skip to content

docs: clarify enter and stay causes for parameter changes #7795

Description

@LadyBluenotes

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:

  • enter means the route ID has newly entered the active route tree.
  • stay means the route ID remains active, including when path params or loader dependencies change.
  • preload applies to preloading work.

That should make it clearer when to use cause for route lifecycle behavior versus match-specific behavior.

Related Work: #3660

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions