---
title: renderMatches
---

# renderMatches

<!--
⚠️ ⚠️ IMPORTANT ⚠️ ⚠️ 

Thank you for helping improve our documentation!

This file is auto-generated from the JSDoc comments in the source
code, so please edit the JSDoc comments in the file below and this
file will be re-generated once those changes are merged.

https://github.com/remix-run/react-router/blob/main/packages/react-router/lib/components.tsx
-->

[MODES: framework, data, declarative]

## Summary

[Reference Documentation ↗](https://api.reactrouter.com/v7/functions/react-router.renderMatches.html)

Renders the result of [`matchRoutes`](../utils/matchRoutes) into a React element.

## Signature

```tsx
function renderMatches(
  matches: RouteMatch[] | null,
): React.ReactElement | null
```

## Params

### matches

The array of [route matches](https://api.reactrouter.com/v7/interfaces/react-router.RouteMatch.html) to render

## Returns

A React element that renders the matched routes or `null` if no matches

