npm / @astrojs/react
@astrojs/react
What changed in @astrojs/react 4 to 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
@astrojs/react 710 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.
New APIs and options 2
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.
Fixes and other changes 1
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 42 changes
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().