---
title: "React Router 7 apps can now be deployed to Edge Functions | Netlify Changelog"
description: "Get the latest updates on Netlify products and features to meet your developer needs."
source: "https://www.netlify.com/changelog/react-router-7-apps-can-now-be-deployed-to-edge-functions/"
last_updated: "2026-07-06T12:16:26.000Z"
---
React Router 7 apps on Netlify are deployed to Serverless Functions by default. Now, you can choose to deploy your app to [Edge Functions](https://docs.netlify.com/build/edge-functions/overview/) instead, bringing your page renders, data loaders, and actions closer to your users while lowering cold start times.

## How to use it

1.  Ensure you’re on version 7.9.0 or later of React Router:

```
npm install react-router@latest @react-router/node@latest @react-router/dev@latest
```

2.  Update to the latest version of the Netlify React Router plugin:

```
npm install @netlify/vite-plugin-react-router@latest
```

3.  Enable the new `edge` option in your `vite.config.ts` (or `.js`):

```
export default defineConfig({  plugins: [    reactRouter(),    netlifyReactRouter({ edge: true }), // <- deploy to Edge Functions    netlify(),  ],})
```

4.  Finally, create a file at `app/entry.server.tsx` (or `.jsx`) containing this single line:

```
export { default } from 'virtual:netlify-server-entry'
```

On your next deploy, page renders, loaders, and actions will all run in an edge function.

## When to use it

_Choose Edge Functions when:_

-   You need **minimal latency** for your **globally distributed users** (edge functions run on the node closest to the user)
-   You need to **optimize cold starts** (initialization is faster with the slim Deno edge runtime)
-   Your data loaders and actions make requests to **databases and APIs that are also globally distributed**, or none at all
-   You need to support very large request or response bodies (Serverless Functions have a 6 MB limit)

_Choose Serverless Functions when:_

-   Your data loaders and actions make requests to **databases or APIs that are centrally located** (canceling out much of the benefit of edge compute)
-   Your server-side code is **CPU-intensive** (Serverless Functions run on more powerful machines)
-   You need **longer execution times** (Functions allow up to 30s clock time, while Edge Functions are limited to 50ms CPU time)
-   You cannot use Edge Functions due to their [runtime constraints](https://docs.netlify.com/build/edge-functions/api/#runtime-environment) or [limitations](https://docs.netlify.com/build/edge-functions/limits/#feature-limitations)

## Next steps

-   Create a new React Router 7 project with [our template](https://github.com/netlify/react-router-template/)
-   Read the [Netlify React Router plugin docs](https://github.com/netlify/remix-compute/tree/main/packages/vite-plugin-react-router#react-router-adapter-for-netlify) for more details on deploying to the edge