object ReactionRouter extends ReactionRouterDOMComponent
- Alphabetic
- By Inheritance
- ReactionRouter
- ReactionRouterDOMComponent
- RoutingConfig
- RoutingSourceComponent
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type Config = ReactionConfig
- Definition Classes
- ReactionRouter → ReactionRouterDOMComponent → RoutingConfig
- type Control = DOMControl
- Definition Classes
- ReactionRouterDOMComponent → RoutingConfig
- type Navigator = (String, Redirect) => Unit
- Definition Classes
- RoutingConfig
- 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
- type RouterInfo = RouterInfoLike
- Definition Classes
- ReactionRouterDOMComponent → RoutingSourceComponent
- type Rules = (PathParts) => Action
If your rule needs a Control for rendering a
ReactNode
, theRender
action takes aControl => ReactNode
so essentially you have, for rendering, aInfo => Control => ReactNode
.If your rule needs a Control for rendering a
ReactNode
, theRender
action takes aControl => ReactNode
so essentially you have, for rendering, aInfo => Control => ReactNode
. Note that action does not return an effectful action e.g. Action is not wrapped in a F context.- Definition Classes
- RoutingConfig
- type State = Option[PathParts]
- Definition Classes
- RoutingSourceComponent
- trait ConfigLike extends ReactionRouterDOMComponent.ConfigLike
- Definition Classes
- ReactionRouterDOMComponent
- case class DOMControl(config: Config) extends ControlLike with Product with Serializable
- Definition Classes
- ReactionRouterDOMComponent
- case class RouterInfoLike(info: Option[PathParts] = None) extends ReactionRouterDOMComponent.RouterInfoLike with Product with Serializable
Context type.
Context type.
- Definition Classes
- ReactionRouterDOMComponent
- 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
- 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
- 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
- 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
- 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
- sealed trait NavAction extends AnyRef
- Attributes
- protected
- Definition Classes
- RoutingSourceComponent
- case class NewInfo(info: Info) extends NavAction with Product with Serializable
- Attributes
- protected
- Definition Classes
- RoutingSourceComponent
- trait Props extends Object
- Definition Classes
- RoutingSourceComponent
- Annotations
- @JSType()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val Name: String
Override to change the name.
Override to change the name.
- Definition Classes
- ReactionRouterDOMComponent → RoutingSourceComponent
- val RouterContext: ReactContext[RouterInfo]
- Definition Classes
- RoutingSourceComponent
- 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
- def apply(children_: ReactNode): ReactNode
- Definition Classes
- RoutingSourceComponent
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def makeContextValue(info: Option[PathParts]): RouterInfoLike
- Definition Classes
- ReactionRouterDOMComponent → RoutingSourceComponent
- def makeControl(config: Config): DOMControl
- Attributes
- protected
- Definition Classes
- ReactionRouterDOMComponent
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val noop: () => Unit
- Definition Classes
- RoutingConfig
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def performRoutingAction(routing: RoutingSource[PathParts, String], config: Config, to: String, method: Redirect): Unit
Override to extend.
Override to extend.
- Attributes
- protected
- Definition Classes
- ReactionRouterDOMComponent → RoutingConfig
- def render: (Props) => ReactNode
- Definition Classes
- RoutingSourceComponent
- val routing: RoutingSource[PathParts, String]
- Attributes
- protected
- Definition Classes
- ReactionRouterDOMComponent → RoutingSourceComponent
- 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
- def shouldRoute(p: PathParts, to: String): Boolean
- Attributes
- protected
- Definition Classes
- ReactionRouterDOMComponent
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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.
- 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
- case object Subscribe extends NavAction with Product with Serializable
- Attributes
- protected
- Definition Classes
- RoutingSourceComponent