Goal
Show how a route component reads its merged router context.
Scope
- Add a component example to
docs/router/guide/router-context.md.
- Use
Route.useRouteContext() for the route-bound case.
- Keep the example consistent with the preceding
Route declaration instead of redefining it.
- Explain or link to the standalone
useRouteContext({ from }) API for components that need context from another route.
- Keep the guide compatible with the shared Router documentation structure.
Related Work
This continues the documentation update started in #5022
Goal
Show how a route component reads its merged router context.
Scope
docs/router/guide/router-context.md.Route.useRouteContext()for the route-bound case.Routedeclaration instead of redefining it.useRouteContext({ from })API for components that need context from another route.Related Work
This continues the documentation update started in #5022