MockRouterCtlF

class MockRouterCtlF[F[_], P](val baseUrl: BaseUrl, pageToPath: P => Path)(ff: Sync[F]) extends RouterCtlF[F, 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 RouterCtlF[F, P]
class Object
trait Matchable
class Any
class MockRouterCtl[P]

Value members

Concrete methods

def clear(): Unit
def events(): Vector[Event[P]]
override def pathFor(p: P): Path
Definition Classes
RouterCtlF
override def refresh: F[Unit]
Definition Classes
RouterCtlF
override def set(p: P, v: SetRouteVia): F[Unit]
Definition Classes
RouterCtlF

Inherited methods

final def contramap[B](f: B => P): RouterCtlF[F, B]
Inherited from
RouterCtlF
final def narrow[B <: P]: RouterCtlF[F, B]
Inherited from
RouterCtlF
final def onLinkClick(route: P): ReactMouseEvent => Option[F[Unit]]
Inherited from
RouterCtlF
final def onSet(f: F[Unit] => F[Unit]): RouterCtlF[F, 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, F[Unit]) => F[Unit]): RouterCtlF[F, 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: F[Unit]): RouterCtlF[F, 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
final def set(route: P): F[Unit]
Inherited from
RouterCtlF
final def setEH(route: P): ReactEvent => F[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: F[Unit]): TagMod
Deprecated
Inherited from
RouterCtlF
@deprecated("Use .onSetRun(callback).setOnLinkClick(route)", "forever")
final def setOnLinkClick(route: P, callback: F[Unit]): TagMod
Deprecated
Inherited from
RouterCtlF

Concrete fields

override val baseUrl: BaseUrl
override val byPath: RouterCtlF[F, Path]