RoutingRulesF

japgolly.scalajs.react.extra.router.RoutingRulesF$
See theRoutingRulesF companion class
object RoutingRulesF

Attributes

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

Members list

Type members

Classlikes

final class Exception(msg: String) extends RuntimeException

Attributes

Supertypes
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def bulk[F[_], Page, Props](toPage: Path => Option[Parsed[Page]], fromPage: Page => (Path, ActionF[F, Page, Props]), notFound: Path => Parsed[Page])(implicit F: Sync[F]): RoutingRulesF[F, Page, Props]

Create routing rules all at once, with compiler proof that all Pages will have a Path and Action associated.

Create routing rules all at once, with compiler proof that all Pages will have a Path and Action associated.

The trade-off here is that care will need to be taken to ensure that path-parsing aligns with paths generated for pages. It is recommended that you call RouterConfig.verify as a sanity-check.

Attributes

def bulkDynamic[F[_], Page, Props](toPage: Path => F[Option[Parsed[Page]]], fromPage: Page => (Path, F[ActionF[F, Page, Props]]), notFound: Path => Parsed[Page])(implicit F: Sync[F]): RoutingRulesF[F, Page, Props]

Create routing rules all at once, with compiler proof that all Pages will have a Path and Action associated.

Create routing rules all at once, with compiler proof that all Pages will have a Path and Action associated.

The trade-off here is that care will need to be taken to ensure that path-parsing aligns with paths generated for pages. It is recommended that you call RouterConfig.verify as a sanity-check.

Attributes

def fromRule[F[_], Page, Props](rule: RoutingRule[Page, Props], fallbackPath: Page => Path, fallbackAction: (Path, Page) => ActionF[F, Page, Props], whenNotFound: Path => F[Parsed[Page]])(implicit F: Sync[F]): RoutingRulesF[F, Page, Props]