Route

japgolly.scalajs.react.extra.router.StaticDsl$.Route
See theRoute companion object
case class Route[A](parse: Path => Option[A], pathFor: A => Path) extends RouteCommon[Route, A]

A Route translates a Path into an instance of model A and vice versa.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait RouteCommon[Route, A]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def parseThen(f: Option[A] => Option[A]): Route[A]

Attributes

Definition Classes
override def pmap[B](b: A => Option[B])(a: B => A): Route[B]

Prism map.

Prism map.

Some values of A can be turned into a Bs, some fail (in which case the route is considered non-matching).

All Bs can be turned back into As.

Attributes

Definition Classes

Inherited methods

final def const[B](b: B)(implicit ev: ValueOf[A]): R[B]

Attributes

Inherited from:
RouteCommon
final def filter(f: A => Boolean): R[A]

Attributes

Inherited from:
RouteCommon
final def mapInput[B >: A](f: B => A): R[B]

Attributes

Inherited from:
RouteCommon
final def mapParsed[B <: A](f: A => B): R[B]

Attributes

Inherited from:
RouteCommon
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def xmap[B](b: A => B)(a: B => A): R[B]

Exponential map.

Exponential map.

Any A can be turned into a B and vice versa.

Attributes

Inherited from:
RouteCommon