RouterWithPropsConfigF

case class RouterWithPropsConfigF[F[_], Page, Props](rules: RoutingRulesF[F, Page, Props], renderFn: (RouterCtlF[F, Page], ResolutionWithProps[Page, Props]) => Props => VdomElement, postRenderFn: (Option[Page], Page, Props) => F[Unit], logger: Logger)(implicit effect: Sync[F])
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
RouterWithPropsConfigF[F, Page, Props]

Value members

Concrete methods

def detectErrors(pages: Page*): F[Seq[String]]

Check specified pages for possible route config errors, and returns any detected.

Check specified pages for possible route config errors, and returns any detected.

Note: Requires that Page#equals() be sensible. Note: If in production-mode (fullOptJS), this always returns an empty collection.

Returns:

Error messages (or an empty collection if no errors are detected).

def logWith(l: Logger): RouterWithPropsConfigF[F, Page, Props]
def onPostRender[G[_]](f: (Option[Page], Page) => G[Unit])(implicit G: Dispatch[G]): RouterWithPropsConfigF[F, Page, Props]

Add an procedure to be performed after the router renders.

Add an procedure to be performed after the router renders.

Value parameters:
f

Given the previous page and the current page that just rendered, return a callback.

def onPostRenderP[G[_]](f: (Option[Page], Page, Props) => G[Unit])(implicit G: Dispatch[G]): RouterWithPropsConfigF[F, Page, Props]

Add an procedure to be performed after the router renders.

Add an procedure to be performed after the router renders.

Value parameters:
f

Given the previous page, the current page that just rendered and props, return a callback.

def renderWith(f: (RouterCtlF[F, Page], ResolutionWithProps[Page, Props]) => VdomElement): RouterWithPropsConfigF[F, Page, Props]

Specify how to render a page once it's resolved. This function will be applied to all renderable pages.

Specify how to render a page once it's resolved. This function will be applied to all renderable pages.

def renderWithP(f: (RouterCtlF[F, Page], ResolutionWithProps[Page, Props]) => Props => VdomElement): RouterWithPropsConfigF[F, Page, Props]

Specify how to render a page once it's resolved. This function will be applied to all renderable pages.

Specify how to render a page once it's resolved. This function will be applied to all renderable pages.

def setPostRender[G[_]](f: (Option[Page], Page) => G[Unit])(implicit G: Dispatch[G]): RouterWithPropsConfigF[F, Page, Props]

Specify (entirely) what to do after the router renders.

Specify (entirely) what to do after the router renders.

Value parameters:
f

Given the previous page and the current page that just rendered, return a callback.

def setPostRenderP[G[_]](f: (Option[Page], Page, Props) => G[Unit])(implicit G: Dispatch[G]): RouterWithPropsConfigF[F, Page, Props]

Specify (entirely) what to do after the router renders.

Specify (entirely) what to do after the router renders.

Value parameters:
f

Given the previous page, the current page that just rendered and props, return a callback.

def setTitle(f: Page => String): RouterWithPropsConfigF[F, Page, Props]

Change the document title after the router renders.

Change the document title after the router renders.

Value parameters:
f

Given the current page that just rendered, return a new title.

def setTitleOption(f: Page => Option[String]): RouterWithPropsConfigF[F, Page, Props]

Change the document title after the router renders.

Change the document title after the router renders.

Value parameters:
f

Given the current page that just rendered, return potential new title.

def setTitleOptionP(f: (Page, Props) => Option[String]): RouterWithPropsConfigF[F, Page, Props]

Change the document title after the router renders.

Change the document title after the router renders.

Value parameters:
f

Given the current page that just rendered and props, return potential new title.

def setTitleP(f: (Page, Props) => String): RouterWithPropsConfigF[F, Page, Props]

Change the document title after the router renders.

Change the document title after the router renders.

Value parameters:
f

Given the current page that just rendered and props, return a new title.

def verify(page1: Page, pages: Page*): RouterWithPropsConfigF[F, Page, Props]

Asserts that the page arguments provided, don't encounter any route config errors.

Asserts that the page arguments provided, don't encounter any route config errors.

If any errors are detected, the Router will be replaced with a new dummy router that displays the error messages.

If you want direct, programmatic access to the errors themselves, use detectErrors instead.

Note: Requires that Page#equals() be sensible. Note: If in production-mode (fullOptJS), this always returns this.

Returns:

In the event that errors are detected, a new RouterConfig that displays them; else this unmodified.

def withEffect[G[_]](implicit G: Sync[G]): RouterWithPropsConfigF[G, Page, Props]

Inherited methods

def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product

Implicits

Implicits

implicit val effect: Sync[F]