object Route
Route, most commonly used router component. Watch out for which apply method you use as rendering with path, children or exact=true does different thnigs. Rendering with a "component" specified as the prop is not supported. Rendering with children means that the child is always rendered regardless of whether there is a match or not.
Type parameter S
stands for
"state" which is state you can add to the history stack per push. P
is a js
object for query parameters, hence, each property should have a string value.
Using the children props always renders regardless of path match. Typically,
use the render prop.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Route
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- trait Props[S, P] extends Object with RouteProps[S]
- 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
- def always[S, P](children: Function1[RouteComponentProps[S, P], ReactNode]): ReactElement
- def always(children: ReactNode): ReactElement
- def apply[S, P](props: Props[S, P])(children: Function1[RouteComponentProps[S, P], ReactNode]): ReactElement
Uses children prop.
- def apply[S, P](props: Props[S, P], child: ReactNode): ReactElement
- 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
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- 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])
- def withExactPath(p: |[String, Array[String]], child: ReactNode): ReactElement
With exact = true
- def withExactPathRender[S, P](p: |[String, Array[String]])(thunk: Function1[RouteComponentProps[S, P], ReactNode]): ReactElement
Uses render prop.
- def withPath[S, P](p: |[String, Array[String]])(children: Function1[RouteComponentProps[S, P], ReactNode]): ReactElement
Uses children prop.
- def withPath(p: |[String, Array[String]], child: ReactNode): ReactElement
- def withPathRender[S, P](p: |[String, Array[String]])(thunk: Function1[RouteComponentProps[S, P], ReactNode]): ReactElement
Uses render prop.
- object JS extends Object with ReactJSComponent
- Annotations
- @native() @JSImport("react-router-dom", "Route")