RoutingRule

japgolly.scalajs.react.extra.router.RoutingRule$
See theRoutingRule companion trait
object RoutingRule

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class Atom[Page, Props](parse: Path => Option[Parsed[Page]], path: Page => Option[Path], action: (Path, Page) => Option[Action[Page, Props]]) extends RoutingRule[Page, Props]

Value parameters

action

Attempt to determine the action when a route resolves to some page.

parse

Attempt to parse a given path.

path

Attempt to determine the path for some page.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait RoutingRule[Page, Props]
class Object
trait Matchable
class Any
Show all
final case class AutoCorrect[Page, Props](underlying: RoutingRule[Page, Props], redirectVia: SetRouteVia) extends RoutingRule[Page, Props]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait RoutingRule[Page, Props]
class Object
trait Matchable
class Any
Show all
final case class Conditional[Page, Props](condition: Function0[Boolean], underlying: RoutingRule[Page, Props], otherwise: Page => Option[Action[Page, Props]]) extends RoutingRule[Page, Props]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait RoutingRule[Page, Props]
class Object
trait Matchable
class Any
Show all
final case class ConditionalP[Page, Props](condition: Page => Function0[Boolean], underlying: RoutingRule[Page, Props], otherwise: Page => Option[Action[Page, Props]]) extends RoutingRule[Page, Props]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait RoutingRule[Page, Props]
class Object
trait Matchable
class Any
Show all
final case class Or[Page, Props](lhs: RoutingRule[Page, Props], rhs: RoutingRule[Page, Props]) extends RoutingRule[Page, Props]

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait RoutingRule[Page, Props]
class Object
trait Matchable
class Any
Show all
final case class WithFallbackF[F[_], Page, Props](rule: RoutingRule[Page, Props], fallbackPath: Page => Path, fallbackAction: (Path, Page) => ActionF[F, Page, Props])(implicit F: Sync[F])

Exhaustive routing rules. For all Pages there are Paths and Actions.

Exhaustive routing rules. For all Pages there are Paths and Actions.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Types

type WithFallback[Page, Props] = WithFallbackF[Sync, Page, Props]

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def empty[P, C]: RoutingRule[P, C]
def parseOnly[Page, C](parse: Path => Option[Parsed[Page]]): Atom[Page, C]