PathMatch
react-router

PathMatch interface

A PathMatch contains info about how a PathPattern matched on a URL pathname.

Properties

params

Type: Params<ParamKey>

The names and values of dynamic parameters in the URL.

pathname

Type: string

The portion of the URL pathname that was matched.

pathnameBase

Type: string

The portion of the URL pathname that was matched before child routes.

pattern

Type: PathPattern<string>

The pattern that was used to match.

Docs and examples CC 4.0