Interface Segment<S>

Interface describing the shape of a Router Segment. A Segment represents a Router.navigated Route and its corresponding Params. As Routes are represented in a tree-like structure and one Segment represents one layer within the Route-tree, each Segment may have a Segment.parent and/or a child. The resulting graph of Segments represents the Router.navigated path through the underlying Route-tree.

interface Segment<S> {
    child?: Segment<string>;
    params: Router.Params<S>;
    parent?: Segment<string>;
    route: Route<S>;
}

Type Parameters

  • S extends string = string

    The Route path string type.

Properties

child?: Segment<string>

Optional child of this Segment.

params: Router.Params<S>

Route path Params and their corresponding values.

parent?: Segment<string>

Optional parent of this Segment.

route: Route<S>

Route associated with this Segment.

Generated using TypeDoc