npm / @astrojs/react
@astrojs/react
What changed in @astrojs/react 3 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
15 breaking2 security2 deprecations7 new APIs and options1 performance3 behavior and defaults3 tooling8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@astrojs/react 717 changes
Breaking changes 7
The minimum supported Node.js version is now 22.22.0, aligning support with StackBlitz and Astro's Node.js support policy.
The babel integration option was removed; custom Babel transforms must move to @rolldown/plugin-babel under vite.plugins.
The old babel callback is unsupported; conditional transforms must use the plugin's overrides and preset hooks.
The Babel plugin no longer loads babel.config.js or .babelrc; options must be passed directly to babel().
React 17 and 18 projects using the compiler must install react-compiler-runtime.
Custom Babel transforms now use @rolldown/plugin-babel and @babel/core configured in vite.plugins.
Babel plugins and presets move from react({ babel: ... }) to babel() in vite.plugins.
Security 1
Astro: Reflected XSS via unescaped slot names in @astrojs/solid-js
Deprecations 1
Importing getContainerRenderer() from the @astrojs/react package root is deprecated; use the dedicated container-renderer entrypoint instead.
New APIs and options 3
A dedicated entrypoint for importing getContainerRenderer() is available to avoid pulling unrelated build-time exports from the package root.
Adds an opt-in Oxc-based React Compiler that memoizes client components and hooks.
The compiler accepts an options object, including compilationMode, for configuring compilation behavior.
Behavior and default changes 1
Dependencies are no longer pinned, allowing versions matching the ^ range to be installed.
Tooling 1
The peer dependency version range expands from ^0.145.0 to >=0.145.0 <0.157.0, allowing a broader range of versions.
Fixes and other changes 3
Preserves component-rendered resource links, including stylesheets, preloads, and modulepreloads, as well as automatic React resource hints, during server rendering.
Fixes duplicate React.useId() values across components when experimentalDisableStreaming is enabled.
Do not enable babel-plugin-react-compiler on components also processed by the Oxc compiler.
@astrojs/react 64 changes
Breaking changes 1
Upgrades the integration to Vite v8, which may affect build tooling and project configuration.
Deprecations 1
Importing getContainerRenderer() from the package root is deprecated and logs a warning; use the container-renderer entrypoint instead.
New APIs and options 1
Adds a dedicated container-renderer entrypoint exporting getContainerRenderer() to avoid bundling unrelated package-root exports.
Fixes and other changes 1
React's renderer check no longer crashes on non-React object components when Vue render-function components are built with @astrojs/react enabled.
@astrojs/react 510 changes
Breaking changes 3
Temporary support for Node >=20.19.1 was removed because Stackblitz now uses Node 22 by default.
The minimum Node.js version is increased to 22.12.0.
Astro v6 upgrades Vite as the development server and production bundler.
Performance 1
Improves the performance of rendering static HTML content in React.
Behavior and default changes 1
The Node.js version requirement is lowered to support running on StackBlitz until it supports v22.
Tooling 1
The React Vite plugin is updated to v5.
Fixes and other changes 4
Filters auto-generated preload resources from Astro island HTML so React Float links are injected into the head and HTML remains valid.
Fixes React hydration errors when rendering slots conditionally.
Fixes hydration mismatches when using experimentalReactChildren.
React component identification improves when configuring include or exclude options alongside multiple JSX frameworks.
@astrojs/react 45 changes
Breaking changes 3
Form submissions using Actions now use
_actioninstead of_astroActionas the generated URL query parameter, avoiding leaking the framework name into the URL bar.Node 21 is no longer supported.
Updates the Vite dependency to match Astro v5.
Security 1
Updates the Vite version to fix a CVE, improving build-tool security for developers.
New APIs and options 1
Adds a client hydration entrypoint to the returned object, enabling client-side interactivity without manually calling container.addClientRenderer().
@astrojs/react 35 changes
Breaking changes 1
Node 16 is no longer supported; Astro and all integrations now require Node 18.14.1 or higher.
New APIs and options 2
Adds an exclude option to specify files not compiled for React when using React alongside another JSX framework.
Adds an include option to specify files compiled for React when using React alongside another JSX framework.
Behavior and default changes 1
React islands are now automatically unmounted when the astro:unmount event fires.
Tooling 1
The React integration now fully supports React Refresh, backed by @vitejs/plugin-react.