useRouteData
Access hierarchical route data passed from parent routes.
Description
Returns a reactive Ref<RouteData> containing all route data merged hierarchically from parent <Switch> and <Route> components.
Returns
Where RouteData is:
Data Merging Behavior
Route data is merged hierarchically with child data overriding parent data:
Example
Access via Props
Route data is also available as props when using :component prop:
Reactive Updates
Route data is fully reactive. Changes in parent routes automatically propagate to child components:
See Hierarchical Data Passing for detailed information.