#2302·waku

Router applies an action's route change before the enhancer chain finishes

Author: dai-shiCreated Sep 17, 2026Updated Sep 17, 2026

The Router handles action responses in an RSC enhancer at order 100. It commits the route change as soon as the response passes through it, while Minimal merges the action's elements only after the whole enhancer chain resolves. An enhancer registered above order 100 that awaits after next() opens a window where the new route renders without its slot, and Slot throws Invalid element: route:/next. The same window also lets a navigation start after the Router decided to keep a rerender of the page the action came from.

The minimal API guide documents this as a constraint (an enhancer above the Router's order must not delay its result), and there is a TODO in packages/waku/src/router/client-utils/navigation.ts.

A fix would have the Router return its route keys inside result.elements, so Minimal applies the route and its slots in one merge instead of the Router committing partway through the chain. That touches changeRoute, which navigation shares.