Skip to content

feat: tag navigation transitions with addTransitionType#188

Merged
uhyo merged 1 commit into
masterfrom
claude/router-add-transition-type-jNk6F
May 24, 2026
Merged

feat: tag navigation transitions with addTransitionType#188
uhyo merged 1 commit into
masterfrom
claude/router-add-transition-type-jNk6F

Conversation

@uhyo
Copy link
Copy Markdown
Owner

@uhyo uhyo commented May 24, 2026

Each entry-change transition now calls React's addTransitionType inside
startTransition with "navigation" by default. The new
experimentalTransitionTypes prop on accepts a function that
returns a custom type list per navigation, receiving the destination URL
and underlying navigationType (push/replace/reload/traverse).

addTransitionType is currently only available in React Canary, so the
implementation looks the API up dynamically and degrades to a no-op on
stable React. The prop carries an "experimental" prefix that will be
dropped once the React API is stable.

Internal adapter subscribe callbacks now pass an EntryChange
discriminated union instead of a bare string so the navigationType can
flow through.

Each entry-change transition now calls React's addTransitionType inside
startTransition with "navigation" by default. The new
experimentalTransitionTypes prop on <Router> accepts a function that
returns a custom type list per navigation, receiving the destination URL
and underlying navigationType (push/replace/reload/traverse).

addTransitionType is currently only available in React Canary, so the
implementation looks the API up dynamically and degrades to a no-op on
stable React. The prop carries an "experimental" prefix that will be
dropped once the React API is stable.

Internal adapter subscribe callbacks now pass an EntryChange
discriminated union instead of a bare string so the navigationType can
flow through.
@uhyo uhyo merged commit c95c331 into master May 24, 2026
1 check passed
@uhyo uhyo deleted the claude/router-add-transition-type-jNk6F branch May 24, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants