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.
- type Action[Page, -Props] = ActionF[Sync, Page, Props]
- sealed trait ActionF[+F[_], Page, -Props] 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[Page] extends ActionF[Nothing, Page, Any]
- final case class RedirectToPage[Page](page: Page, via: SetRouteVia) extends Redirect[Page] with Product with Serializable
- final case class RedirectToPath[Page](path: Path, via: SetRouteVia) extends Redirect[Page] with Product with Serializable
- type Renderer[Page, -Props] = RendererF[Sync, Page, Props]
- final case class RendererF[F[_], Page, -Props](render: (RouterCtlF[F, Page]) => (Props) => VdomElement)(implicit sync: Sync[F]) extends ActionF[F, Page, Props] 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], OnUnmountF[Sync]], Box[Unit], Nullary, JsUnmounted[Unit, Resolution[P], OnUnmountF[Sync]]]
- type RouterConfig[P] = RouterWithPropsConfigF[Sync, 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.
- type RouterCtl[A] = RouterCtlF[Sync, A]
- abstract class RouterCtlF[F[_], 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.
- type RouterF[F[_], P] = component.Js.ComponentWithRoot[Unit, Nullary, Unmounted[Unit, Resolution[P], OnUnmountF[F]], Box[Unit], Nullary, JsUnmounted[Unit, Resolution[P], OnUnmountF[F]]]
- type RouterFM[F[_], P] = MountedWithRoot[Id, util.DefaultEffects.Async, Unit, Resolution[P], OnUnmountF[F], Unit, Resolution[P]]
- type RouterFU[F[_], P] = UnmountedWithRoot[Unit, MountedImpure[Unit, Resolution[P], OnUnmountF[F]], Box[Unit], JsMounted[Unit, Resolution[P], OnUnmountF[F]]]
- type RouterLogic[Page, Props] = RouterLogicF[Sync, Page, Props]
- final class RouterLogicF[F[_], Page, Props] extends BroadcasterF[F, 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, util.DefaultEffects.Async, Unit, Resolution[P], OnUnmountF[Sync], Unit, Resolution[P]]
- type RouterU[P] = UnmountedWithRoot[Unit, MountedImpure[Unit, Resolution[P], OnUnmountF[Sync]], Box[Unit], JsMounted[Unit, Resolution[P], OnUnmountF[Sync]]]
- type RouterWithProps[P, Props] = component.Js.ComponentWithRoot[Props, Props, Unmounted[Props, ResolutionWithProps[P, Props], OnUnmountF[Sync]], Box[Props], Props, JsUnmounted[Props, ResolutionWithProps[P, Props], OnUnmountF[Sync]]]
- type RouterWithPropsConfig[Page, Props] = RouterWithPropsConfigF[Sync, Page, Props]
- case class RouterWithPropsConfigF[F[_], Page, Props](rules: RoutingRulesF[F, Page, Props], renderFn: (RouterCtlF[F, Page], ResolutionWithProps[Page, Props]) => (Props) => VdomElement, postRenderFn: (Option[Page], Page, Props) => F[Unit], logger: Logger)(implicit effect: Sync[F]) extends Product with Serializable
- type RouterWithPropsF[F[_], P, Props] = component.Js.ComponentWithRoot[Props, Props, Unmounted[Props, ResolutionWithProps[P, Props], OnUnmountF[F]], Box[Props], Props, JsUnmounted[Props, ResolutionWithProps[P, Props], OnUnmountF[F]]]
- type RouterWithPropsFM[F[_], P, Props] = MountedWithRoot[Id, util.DefaultEffects.Async, Props, ResolutionWithProps[P, Props], OnUnmountF[F], Props, ResolutionWithProps[P, Props]]
- type RouterWithPropsFU[F[_], P, Props] = UnmountedWithRoot[Props, MountedImpure[Props, ResolutionWithProps[P, Props], OnUnmountF[F]], Box[Props], JsMounted[Props, ResolutionWithProps[P, Props], OnUnmountF[F]]]
- type RouterWithPropsM[P, Props] = MountedWithRoot[Id, util.DefaultEffects.Async, Props, ResolutionWithProps[P, Props], OnUnmountF[Sync], Props, ResolutionWithProps[P, Props]]
- type RouterWithPropsU[P, Props] = UnmountedWithRoot[Props, MountedImpure[Props, ResolutionWithProps[P, Props], OnUnmountF[Sync]], Box[Props], JsMounted[Props, ResolutionWithProps[P, Props], OnUnmountF[Sync]]]
- 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.
- type RoutingRules[Page, Props] = RoutingRulesF[Sync, Page, Props]
A complete set of routing rules that allow the router to handle every all routes without further input.
- final case class RoutingRulesF[F[_], Page, Props](parseMulti: (Path) => List[StaticOrDynamic[Option[Parsed[Page]]]], path: (Page) => Path, actionMulti: (Path, Page) => List[StaticOrDynamic[Option[ActionF[F, Page, Props]]]], fallbackAction: (Path, Page) => ActionF[F, Page, Props], whenNotFound: (Path) => F[Parsed[Page]])(implicit F: Sync[F]) 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.
Value Members
- def RouterWithPropsConfig[Page, Props](rules: RoutingRules[Page, Props], renderFn: (RouterCtl[Page], ResolutionWithProps[Page, Props]) => (Props) => VdomElement, postRenderFn: (Option[Page], Page, Props) => Sync[Unit], logger: Logger): RouterWithPropsConfig[Page, Props]
- Annotations
- @inline()
- object AbsUrl extends Serializable
- object BaseUrl extends Serializable
- object Path extends Serializable
- object RouteCmd
- object Router
- object RouterConfig
- object RouterConfigDsl
- object RouterCtlF
- object RouterWithProps
- object RouterWithPropsConfigDsl
- object RoutingRule
- object RoutingRules
- object RoutingRulesF 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.