---
title: matchPath
---

# matchPath

[MODES: framework, data, declarative]

## Summary

[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react_router.matchPath.html)

Performs pattern matching on a URL pathname and returns information about
the match.

## Signature

```tsx
matchPath(pattern, pathname): undefined
```

## Params

### pattern

[modes: framework, data, declarative]

_No documentation_

### pathname

[modes: framework, data, declarative]

_No documentation_
