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
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Route
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait Props[S, P] extends Object with RouteProps[S]
    Annotations
    @JSType()

Value Members

  1. def always[S, P](children: Function1[RouteComponentProps[S, P], ReactNode]): ReactElement
  2. def always(children: ReactNode): ReactElement
  3. def apply[S, P](props: Props[S, P])(children: Function1[RouteComponentProps[S, P], ReactNode]): ReactElement

    Uses children prop.

  4. def apply[S, P](props: Props[S, P], child: ReactNode): ReactElement
  5. def withExactPath(p: |[String, Array[String]], child: ReactNode): ReactElement

    With exact = true

  6. def withExactPathRender[S, P](p: |[String, Array[String]])(thunk: Function1[RouteComponentProps[S, P], ReactNode]): ReactElement

    Uses render prop.

  7. def withPath[S, P](p: |[String, Array[String]])(children: Function1[RouteComponentProps[S, P], ReactNode]): ReactElement

    Uses children prop.

  8. def withPath(p: |[String, Array[String]], child: ReactNode): ReactElement
  9. def withPathRender[S, P](p: |[String, Array[String]])(thunk: Function1[RouteComponentProps[S, P], ReactNode]): ReactElement

    Uses render prop.

  10. object JS extends Object with ReactJSComponent
    Annotations
    @native() @JSImport("react-router-dom", "Route")