MockRouterCtl

japgolly.scalajs.react.test.MockRouterCtl
See theMockRouterCtl companion object
class MockRouterCtl[P](baseUrl: BaseUrl, pageToPath: P => Path) extends MockRouterCtlF[Sync, P]

Mock RouterCtl that does nothing but record events.

Call events to inspect recorded events, and clear to clear them.

Attributes

Companion
object
Graph
Supertypes
class MockRouterCtlF[Sync, P]
class RouterCtlF[Sync, P]
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

def clear(): Unit

Attributes

Inherited from:
MockRouterCtlF
final def contramap[B](f: B => P): RouterCtlF[F, B]

Attributes

Inherited from:
RouterCtlF
def events(): Vector[Event[P]]

Attributes

Inherited from:
MockRouterCtlF
final def narrow[B <: P]: RouterCtlF[F, B]

Attributes

Inherited from:
RouterCtlF
final def onLinkClick(route: P): ReactMouseEvent => Option[F[Unit]]

Attributes

Inherited from:
RouterCtlF
final def onSet(f: Function0[Unit] => Function0[Unit]): RouterCtlF[F, Route]

Change the behaviour of set and all derivatives.

Change the behaviour of set and all derivatives.

For example, this can be used to set a component's state immediately before setting a new route.

Attributes

Inherited from:
RouterCtlF
final def onSet(f: (P, Function0[Unit]) => Function0[Unit]): RouterCtlF[F, Route]

Change the behaviour of set and all derivatives.

Change the behaviour of set and all derivatives.

For example, this can be used to set a component's state immediately before setting a new route.

Attributes

Inherited from:
RouterCtlF
final def onSetRun(f: Function0[Unit]): RouterCtlF[F, Route]

Return a new version of this that executes the specified callback after setting new routes.

Return a new version of this that executes the specified callback after setting new routes.

Attributes

Inherited from:
RouterCtlF
override def pathFor(p: P): Path

Attributes

Definition Classes
MockRouterCtlF -> RouterCtlF
Inherited from:
MockRouterCtlF
override def refresh: F[Unit]

Attributes

Definition Classes
MockRouterCtlF -> RouterCtlF
Inherited from:
MockRouterCtlF
override def set(p: P, v: SetRouteVia): F[Unit]

Attributes

Definition Classes
MockRouterCtlF -> RouterCtlF
Inherited from:
MockRouterCtlF
final def set(route: P): F[Unit]

Attributes

Inherited from:
RouterCtlF
final def setEH(route: P): ReactEvent => F[Unit]

Attributes

Inherited from:
RouterCtlF
final def setOnClick(route: P): TagMod

Attributes

Inherited from:
RouterCtlF
final def setOnLinkClick(route: P): TagMod

Attributes

Inherited from:
RouterCtlF
final def urlFor(route: P): AbsUrl

Attributes

Inherited from:
RouterCtlF
def withEffect[G[_]](implicit G: Sync[G]): RouterCtlF[G, Route]

Attributes

Inherited from:
RouterCtlF

Deprecated and Inherited methods

final def setOnClick(route: P, callback: Function0[Unit]): TagMod

Attributes

Deprecated
true
Inherited from:
RouterCtlF
final def setOnLinkClick(route: P, callback: Function0[Unit]): TagMod

Attributes

Deprecated
true
Inherited from:
RouterCtlF

Inherited fields

override val byPath: RouterCtlF[Sync, Path]

Attributes

Inherited from:
MockRouterCtlF