Comparison
Nested routevsRoute parameter
Nested route
the sidebar stayed mounted and kept its scroll position while the panel next to it changed.
A route hierarchy where a parent renders persistent layout and a child fills a slot inside it. It preserves state and avoids re-rendering shared chrome on every navigation, and it lets data loading be declared per level so parallel fetching is possible. The cost is that a persistent layout does not remount, so anything it initialises has to handle the route changing underneath it.
Full entry →Route parameter
you navigated from one profile to another and the component kept the previous user's data on screen.
A variable segment of a path that identifies which record a route is showing. The trap is that navigating between two values of the same route reuses the component rather than remounting it, so anything initialised on mount does not re-run. Either key the component on the parameter or treat the parameter as a dependency everywhere it is read.
Full entry →