package router
- Alphabetic
- By Inheritance
- router
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class AbsUrl(value: String) extends PathLike[AbsUrl] with Product with Serializable
An absolute URL.
- sealed trait Action[P] extends Product with Serializable
- final case class BaseUrl(value: String) extends PathLike[BaseUrl] with Product with Serializable
The prefix of all routes on a page.
The prefix of all routes on a page.
The router expects this to be a full URL. Examples:
BaseUrl("http://www.blah.com/hello"),BaseUrl.fromWindowOrigin / "hello". - final case class Path(value: String) extends PathLike[Path] with Product with Serializable
The portion of the URL after the BaseUrl.
- abstract class PathLike[Self <: PathLike[Self]] extends AnyRef
- sealed trait Redirect[P] extends Action[P]
- final case class RedirectToPage[P](page: P, via: SetRouteVia) extends Redirect[P] with Product with Serializable
- final case class RedirectToPath[P](path: Path, via: SetRouteVia) extends Redirect[P] with Product with Serializable
- final case class Renderer[P, Props](f: (RouterCtl[P]) => (Props) => VdomElement) extends Action[P] with Product with Serializable
- type Resolution[P] = ResolutionWithProps[P, Unit]
- final case class ResolutionWithProps[P, Props](page: P, renderP: (Props) => VdomElement) extends Product with Serializable
Result of the router resolving a URL and reaching a conclusion about what to render.
Result of the router resolving a URL and reaching a conclusion about what to render.
- page
Data representation (or command) of what will be drawn.
- sealed abstract class RouteCmd[A] extends AnyRef
- type Router[P] = component.Js.ComponentWithRoot[Unit, Nullary, Unmounted[Unit, Resolution[P], Backend], Box[Unit], Nullary, JsUnmounted[Unit, Resolution[P], Backend]]
- type RouterConfig[P] = RouterWithPropsConfig[P, Unit]
- final class RouterConfigDsl[Page, Props] extends AnyRef
DSL for creating RouterConfig.
DSL for creating RouterConfig.
Instead creating an instance of this yourself, use RouterConfigDsl.apply.
- abstract class RouterCtl[Route] extends AnyRef
Router controller.
Router controller. A client API to the router.
- Route
A data type that indicates a route that can be navigated to.
- final class RouterLogic[Page, Props] extends Broadcaster[Unit]
Performs all routing logic.
Performs all routing logic.
- Page
Routing rules context. Prevents different routing rule sets being mixed up.
- type RouterM[P] = MountedWithRoot[Id, Unit, Resolution[P], Backend, Unit, Resolution[P]]
- type RouterU[P] = UnmountedWithRoot[Unit, MountedImpure[Unit, Resolution[P], Backend], Box[Unit], JsMounted[Unit, Resolution[P], Backend]]
- type RouterWithProps[P, Props] = component.Js.ComponentWithRoot[Props, Props, Unmounted[Props, ResolutionWithProps[P, Props], Backend], Box[Props], Props, JsUnmounted[Props, ResolutionWithProps[P, Props], Backend]]
- case class RouterWithPropsConfig[Page, Props](rules: RoutingRules[Page], renderFn: (RouterCtl[Page], ResolutionWithProps[Page, Props]) => (Props) => VdomElement, postRenderFn: (Option[Page], Page, Props) => Callback, logger: Logger) extends Product with Serializable
- type RouterWithPropsM[P, Props] = MountedWithRoot[Id, Props, ResolutionWithProps[P, Props], Backend, Props, ResolutionWithProps[P, Props]]
- type RouterWithPropsU[P, Props] = UnmountedWithRoot[Props, MountedImpure[Props, ResolutionWithProps[P, Props], Backend], Box[Props], JsMounted[Props, ResolutionWithProps[P, Props], Backend]]
- sealed trait RoutingRule[Page, Props] extends AnyRef
A single routing rule.
A single routing rule. Intended to be composed with other RoutingRules. When all rules are composed, this is turned into a RoutingRule.WithFallback instance.
- Page
The type of legal pages. Most commonly, a sealed trait that you've created, where all subclasses represent a page in your SPA.
- final case class RoutingRules[Page](parseMulti: (Path) => List[StaticOrDynamic[Option[Parsed[Page]]]], path: (Page) => Path, actionMulti: (Path, Page) => List[StaticOrDynamic[Option[Action[Page]]]], fallbackAction: (Path, Page) => Action[Page], whenNotFound: (Path) => CallbackTo[Parsed[Page]]) extends Product with Serializable
A complete set of routing rules that allow the router to handle every all routes without further input.
A complete set of routing rules that allow the router to handle every all routes without further input.
- Page
The type of legal pages. Most commonly, a sealed trait that you've created, where all subclasses represent a page in your SPA.
- sealed trait SetRouteVia extends AnyRef
The means by which the location should be set to a given URL.
- final case class StaticOrDynamic[A](value: Either[CallbackTo[A], A]) extends Product with Serializable
Value Members
- object AbsUrl extends Serializable
- object BaseUrl extends Serializable
- object Path extends Serializable
- object Redirect extends Serializable
- object RouteCmd
- object Router
- object RouterConfig
- object RouterConfigDsl
- object RouterCtl
- object RouterWithProps
- object RouterWithPropsConfigDsl
- object RoutingRule
- object RoutingRules extends Serializable
- object SetRouteVia
- object StaticDsl
This is not meant to be imported by library-users; RouterConfigDsl is the entire library-user-facing facade & DSL.
- object StaticOrDynamic extends Serializable