TRANSITION_TIMEOUT
The swap promise of a page transition did not settle within the timeout, so the transition gave up its flights.
On this page
TRANSITION_TIMEOUT: the swap did not settle in {seconds} sThis warning prints in development builds only.
Why it happens
- The swap returns a promise that takes longer than
timeout, 10 s by default. The next page loads slowly, or the router waits for something that does not happen. - The promise never settles, for example a router hook that resolves only on a later event.
The copies and veils of the transition are released, and the transition resolves with status: 'failed'. transition.swapped still waits for the swap, so the router finishes its own replacement. When the DOM changes late, effects reconcile it as usual, without flights.
How to fix
- Make the swap’s promise settle once the DOM is replaced, not after unrelated work.
- For routes that are slow on purpose, raise
timeoutfor that call.
import { type App, transition } from '@dioramajs/diorama'
export function go(app: App, swap: () => Promise<void>) { return transition(app, swap, { timeout: 20 })}