diff --git a/.changeset/chatty-eels-flow.md b/.changeset/chatty-eels-flow.md new file mode 100644 index 000000000..f97438041 --- /dev/null +++ b/.changeset/chatty-eels-flow.md @@ -0,0 +1,5 @@ +--- +'@astrojs/cloudflare': minor +--- + +Make Cloudflare adapter compatible with React 19 (useActionState, etc.) by switching to React's edge renderer for SSR diff --git a/packages/cloudflare/src/index.ts b/packages/cloudflare/src/index.ts index 4facef327..bd7366cbe 100644 --- a/packages/cloudflare/src/index.ts +++ b/packages/cloudflare/src/index.ts @@ -219,7 +219,7 @@ export default function createIntegration(args?: Options): AstroIntegration { const aliases = [ { find: 'react-dom/server', - replacement: 'react-dom/server.browser', + replacement: 'react-dom/server.edge', }, ];