Skip to content

Commit 3bf4800

Browse files
authored
Update React Router documentation with SPA note
1 parent a792ac0 commit 3bf4800

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/content/docs/workers/framework-guides/web-apps/react-router.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ import {
2828

2929
[![Deploy to Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/templates/tree/main/react-router-starter-template)
3030

31+
:::note
32+
SPA mode and prerendering are not currently supported when using the [Cloudflare Vite plugin](/workers/vite-plugin/).
33+
If you wish to use React Router in an SPA then we recommend starting with the [React template](/workers/framework-guides/web-apps/react/) and using React Router [as a library](https://reactrouter.com/start/data/installation).
34+
:::
35+
3136
## What is React Router?
3237

3338
[React Router v7](https://reactrouter.com/) is a full-stack React framework for building web applications.
@@ -69,10 +74,6 @@ It combines with the [Cloudflare Vite plugin](/workers/vite-plugin/) to provide
6974
- `ssr` is set to `true`, meaning that your application will use server-side rendering.
7075
- `future.unstable_viteEnvironmentApi` is set to `true` to enable compatibility with the [Cloudflare Vite plugin](/workers/vite-plugin/).
7176

72-
:::note
73-
SPA mode and prerendering are not currently supported when using the [Cloudflare Vite plugin](/workers/vite-plugin/).
74-
If you wish to use React Router in an SPA then we recommend starting with the [React template](/workers/framework-guides/web-apps/react/) and using React Router [as a library](https://reactrouter.com/start/data/installation).
75-
:::
7677

7778
`vite.config.ts` is your [Vite config file](https://vite.dev/config/).
7879
The React Router and Cloudflare plugins are included in the `plugins` array.

0 commit comments

Comments
 (0)