useMatch
useMatch<ParamKey,Path>(pattern: Path | PathPattern<Path>): PathMatch<ParamKey> | null
Returns a PathMatch object if the given pattern matches the current URL.
This is useful for components that need to know "active" state, e.g.
<NavLink>.
Properties
(Mandatory properties are in bold)Properties | Type | Description |
---|---|---|
pattern | Path | PathPattern<Path> |