japgolly.scalajs.react.extra.router

Router

Related Docs: object Router | package router

final class Router[P] extends Broadcaster[Unit]

Performs all routing logic.

P

Routing rules context. Prevents different routing rule sets being mixed up.

Linear Supertypes
Broadcaster[Unit], Listenable[Unit], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Router
  2. Broadcaster
  3. Listenable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Router(baseUrl: BaseUrl, pathAction: (Path) ⇒ RouteAction[P], onSync: (Location[P]) ⇒ IO[Unit], logger: Logger)

    baseUrl

    The prefix of all routes in a set.

    pathAction

    Determines the appropriate response to a route path.

Type Members

  1. type Cmd[A] = RouteCmd[P, A]

  2. type Loc = Location[P]

  3. type Prog[A] = Free[[x]Coyoneda[[α]RouteCmd[P, α], x], A]

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. val baseUrl: BaseUrl

    The prefix of all routes in a set.

  6. def broadcast(a: Unit): Unit

    Attributes
    protected
    Definition Classes
    Broadcaster
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. implicit def impbaseurl: BaseUrl

    Attributes
    protected
    Annotations
    @inline()
  14. val init: IO[Unit]

  15. def interpret[A](r: Prog[A]): IO[A]

  16. val interpretCmd: ~>[Cmd, IO]

  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. def link(p: ApprovedPath[P]): vdom.prefix_<^.ReactTag

  19. final def listeners: List[(Unit) ⇒ Unit]

    Attributes
    protected
    Definition Classes
    Broadcaster
  20. def log(msg: ⇒ String): Log

    Attributes
    protected
    Annotations
    @inline()
  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. def parseUrl(url: AbsUrl): Option[Path]

  25. def prog(e: \/[Prog[Loc], Loc]): Prog[Loc]

  26. def redirectCmd(p: Path, m: Method): Cmd[Unit]

  27. def register(f: (Unit) ⇒ Unit): () ⇒ Unit

    Register a listener.

    Register a listener.

    f

    The listener. A procedure that receives data of type A.

    returns

    A procedure to unregister the given listener.

    Definition Classes
    BroadcasterListenable
  28. val resolve: (RouteAction[P]) ⇒ \/[Prog[Loc], Loc]

  29. def set(p: ApprovedPath[P]): Prog[Unit]

  30. def setEH(p: ApprovedPath[P]): (ReactEvent) ⇒ IO[Unit]

  31. def setIO(p: ApprovedPath[P]): IO[Unit]

  32. def setOnClick(p: ApprovedPath[P]): vdom.prefix_<^.TagMod

  33. def syncToUrl(url: AbsUrl): \/[Prog[Loc], Loc]

    returns

    How to synchronise the Router to a given url. Either a valid route, or a command that needs to be run.

  34. def syncToWindowUrl: IO[Loc]

  35. def syncToWindowUrlS: ReactST[IO, Loc, Unit]

  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  37. def toString(): String

    Definition Classes
    AnyRef → Any
  38. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. def wrongBase(wrongUrl: AbsUrl): Prog[Loc]

Inherited from Broadcaster[Unit]

Inherited from Listenable[Unit]

Inherited from AnyRef

Inherited from Any

Ungrouped