Overview
animatedRouter is the same ordered matcher as Router, with exit → swap → enter transitions. Pass component (not view). Global enter / exit presets can be overridden per route.
It calls claimRouterOutlet("animatedRouter") — mounting both Router and animatedRouter (or two outlets) in one scope throws.
Router vs animatedRouter
|
API
|
Matching
|
Transitions
|
|---|---|---|
Router
| ordered first-match | Instant swap — no enter/exit animation. |
animatedRouter
| same matching | Exit → swap → enter using presets (global + per-route). |
Tiny animatedRouter (two routes)
Home ↔ About with fade presets. Do not also mount Router.
Per-route enter/exit
Same two routes; About gets slower fade. Global options still apply to Home.