---
title: matchRoutes
---

# matchRoutes

[MODES: framework, data, declarative]

## Summary

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

Matches the given routes to a location and returns the match data.

## Signature

```tsx
matchRoutes(routes, locationArg, basename): undefined
```

## Params

### routes

[modes: framework, data, declarative]

_No documentation_

### locationArg

[modes: framework, data, declarative]

_No documentation_

### basename

[modes: framework, data, declarative]

_No documentation_
