o

router.browser

ReactionRouter

object ReactionRouter extends ReactionRouterDOMComponent

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReactionRouter
  2. ReactionRouterDOMComponent
  3. RoutingConfig
  4. RoutingSourceComponent
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type Config = ReactionConfig
  2. type Control = DOMControl
  3. type Navigator = (String, Redirect) => Unit
    Definition Classes
    RoutingConfig
  4. case class ReactionConfig(rules: ReactionRouter.Rules, prefixPath: Option[String] = None, postRender: Option[(PathParts) => Unit] = None, render: (ReactionRouter.Control, (ReactionRouter.Control) => ReactNode) => ReactNode = (c,f) => f(c)) extends ConfigLike with Product with Serializable
  5. type RouterInfo = RouterInfoLike
  6. type Rules = (PathParts) => Action

    If your rule needs a Control for rendering a ReactNode, the Render action takes a Control => ReactNode so essentially you have, for rendering, a Info => Control => ReactNode.

    If your rule needs a Control for rendering a ReactNode, the Render action takes a Control => ReactNode so essentially you have, for rendering, a Info => Control => ReactNode. Note that action does not return an effectful action e.g. Action is not wrapped in a F context.

    Definition Classes
    RoutingConfig
  7. type State = Option[PathParts]
    Definition Classes
    RoutingSourceComponent
  8. trait ConfigLike extends ReactionRouterDOMComponent.ConfigLike
    Definition Classes
    ReactionRouterDOMComponent
  9. case class DOMControl(config: Config) extends ControlLike with Product with Serializable
    Definition Classes
    ReactionRouterDOMComponent
  10. case class RouterInfoLike(info: Option[PathParts] = None) extends ReactionRouterDOMComponent.RouterInfoLike with Product with Serializable

    Context type.

    Context type.

    Definition Classes
    ReactionRouterDOMComponent
  11. sealed trait Action extends Product with Serializable

    Take some action as the result of processing a rule.

    Take some action as the result of processing a rule.

    Definition Classes
    RoutingConfig
  12. trait ControlLike extends AnyRef

    Callback arg used by components that hides router and navigation implementation details.

    Callback arg used by components that hides router and navigation implementation details. Not async! When your action is render, you receive a Control as a parameter that you pass to your child component so they can perform navigation actions, such as render a link element. You can curry the navigate function so that components can be fed a simpler To => Unit callback.

    Definition Classes
    RoutingConfig
  13. case class RedirectTo(to: To, method: Redirect, effect: () => Unit = noop) extends Action with Product with Serializable

    Go to another page with a specific method to get there.

    Go to another page with a specific method to get there.

    Definition Classes
    RoutingConfig
  14. case class Render(run: (Control) => ReactNode, effect: () => Unit = noop) extends Action with Product with Serializable

    Render a node allowing that node to use Controls to create "links".

    Render a node allowing that node to use Controls to create "links". Can render to null!

    Definition Classes
    RoutingConfig
  15. case class rule(run: (Info) => Option[Action]) extends Product with Serializable

    Small rules DSL.

    Small rules DSL. Create a rule that can return an optional action.

    Definition Classes
    RoutingConfig
  16. trait Props extends Object
    Definition Classes
    RoutingSourceComponent
    Annotations
    @JSType()

Value Members

  1. val Name: String

    Override to change the name.

    Override to change the name.

    Definition Classes
    ReactionRouterDOMComponentRoutingSourceComponent
  2. val RouterContext: ReactContext[RouterInfo]
    Definition Classes
    RoutingSourceComponent
  3. def always(always: => Action): Rules

    Create a rule that ignores the Info inpt.

    Create a rule that ignores the Info inpt. Provides semantic gesture.

    Definition Classes
    RoutingConfig
  4. def apply(children_: ReactNode): ReactNode
    Definition Classes
    RoutingSourceComponent
  5. def makeContextValue(info: Option[PathParts]): RouterInfoLike
  6. val noop: () => Unit
    Definition Classes
    RoutingConfig
  7. def render: (Props) => ReactNode
    Definition Classes
    RoutingSourceComponent
  8. def rules(run: (PathParts) => Action): Rules

    Create rules, you don't need to use this.

    Create rules, you don't need to use this. Provides semantic gesture.

    Definition Classes
    RoutingConfig
  9. object Route

    A component that uses the context provider and a Config to route.

    A component that uses the context provider and a Config to route.

    Definition Classes
    ReactionRouterDOMComponent
    To do

    Schedule effect to be run after rule action using a reducerComponent.

  10. object ShowIfMatch

    If the predicate is true, show the child component and optionally alter the context the child sees to reflect the match e.g.

    If the predicate is true, show the child component and optionally alter the context the child sees to reflect the match e.g. strip off the front segment of the URL.

    Definition Classes
    RoutingSourceComponent