MockRouterCtl

class MockRouterCtl[P](baseUrl: BaseUrl, pageToPath: P => Path) extends MockRouterCtlF[Sync, P]

Mock RouterCtl that does nothing but record events.

Mock RouterCtl that does nothing but record events.

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

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

Value members

Inherited methods

def clear(): Unit
Inherited from
MockRouterCtlF
final def contramap[B](f: B => P): RouterCtlF[Sync, B]
Inherited from
RouterCtlF
def events(): Vector[Event[P]]
Inherited from
MockRouterCtlF
final def narrow[B <: P]: RouterCtlF[Sync, B]
Inherited from
RouterCtlF
final def onLinkClick(route: P): ReactMouseEvent => Option[Function0[Unit]]
Inherited from
RouterCtlF
final def onSet(f: Function0[Unit] => Function0[Unit]): RouterCtlF[Sync, P]

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.

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

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.

Inherited from
RouterCtlF
final def onSetRun(f: Function0[Unit]): RouterCtlF[Sync, P]

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.

Inherited from
RouterCtlF
override def pathFor(p: P): Path
Definition Classes
MockRouterCtlF -> RouterCtlF
Inherited from
MockRouterCtlF
override def refresh: Function0[Unit]
Definition Classes
MockRouterCtlF -> RouterCtlF
Inherited from
MockRouterCtlF
override def set(p: P, v: SetRouteVia): Function0[Unit]
Definition Classes
MockRouterCtlF -> RouterCtlF
Inherited from
MockRouterCtlF
final def set(route: P): Function0[Unit]
Inherited from
RouterCtlF
final def setEH(route: P): ReactEvent => Function0[Unit]
Inherited from
RouterCtlF
final def setOnClick(route: P): TagMod
Inherited from
RouterCtlF
final def setOnLinkClick(route: P): TagMod
Inherited from
RouterCtlF
final def urlFor(route: P): AbsUrl
Inherited from
RouterCtlF
def withEffect[G[_]](G: Sync[G]): RouterCtlF[G, P]
Inherited from
RouterCtlF

Deprecated and Inherited methods

@deprecated("Use .onSetRun(callback).setOnClick(route)", "forever")
final def setOnClick(route: P, callback: Function0[Unit]): TagMod
Deprecated
Inherited from
RouterCtlF
@deprecated("Use .onSetRun(callback).setOnLinkClick(route)", "forever")
final def setOnLinkClick(route: P, callback: Function0[Unit]): TagMod
Deprecated
Inherited from
RouterCtlF

Inherited fields

override val byPath: RouterCtlF[Sync, Path]
Inherited from
MockRouterCtlF