feat: apply local router changes

This commit is contained in:
Jonathan Kelley committed 2022-03-04 13:16:37 -05:00
1 parent 3928856a9b
commit f2979cb12a
28 files changed
+672 -516

No files matched your search

+19 -2
View File
@@ -1,7 +1,24 @@
/// A `RouteContext` is a context that is provided by [`Route`](fn.Route.html) components.
///
/// This signals to all child [`Route`] and [`Link`] components that they are
/// currently nested under this route.
#[derive(Debug, Clone)]
pub struct RouteContext {
// "/name/:id"
/// The `declared_route` is the sub-piece of the route that matches this pattern.
///
///
/// It follows this pattern:
/// ```
/// "name/:id"
/// ```
pub declared_route: String,
// "app/name/:id"
/// The `total_route` is the full route that matches this pattern.
///
///
/// It follows this pattern:
/// ```
/// "/level0/level1/:id"
/// ```
pub total_route: String,
}