# What changed in @astrojs/react

> 26 changes in @astrojs/react 4 to 7 from its official release notes, upgrade guides and advisories: 11 breaking, 1 deprecations, 1 security, 4 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/npm/@astrojs/react/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @astrojs/react 7

### Breaking changes

- The minimum supported Node.js version is now 22.22.0, aligning support with StackBlitz and Astro's Node.js support policy. (7.1.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%407.1.0)
- The babel integration option was removed; custom Babel transforms must move to @rolldown/plugin-babel under vite.plugins. (7.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%407.0.0)
- The old babel callback is unsupported; conditional transforms must use the plugin's overrides and preset hooks. (7.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%407.0.0)
- The Babel plugin no longer loads babel.config.js or .babelrc; options must be passed directly to babel(). (7.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%407.0.0)
- React 17 and 18 projects using the compiler must install react-compiler-runtime. (7.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%407.0.0)
- Custom Babel transforms now use @rolldown/plugin-babel and @babel/core configured in vite.plugins. (7.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%407.0.0)
- Babel plugins and presets move from react({ babel: ... }) to babel() in vite.plugins. (7.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%407.0.0)

### New APIs and options

- Adds an opt-in Oxc-based React Compiler that memoizes client components and hooks. (7.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%407.0.0)
- The compiler accepts an options object, including compilationMode, for configuring compilation behavior. (7.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%407.0.0)

### Fixes and other changes

- Do not enable babel-plugin-react-compiler on components also processed by the Oxc compiler. (7.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%407.0.0)

## @astrojs/react 6

### Breaking changes

- Upgrades the integration to Vite v8, which may affect build tooling and project configuration. (6.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%406.0.0)

### Deprecations

- Importing getContainerRenderer() from the package root is deprecated and logs a warning; use the container-renderer entrypoint instead. (6.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%406.0.0)

### New APIs and options

- Adds a dedicated container-renderer entrypoint exporting getContainerRenderer() to avoid bundling unrelated package-root exports. (6.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%406.0.0)

### Fixes and other changes

- React's renderer check no longer crashes on non-React object components when Vue render-function components are built with @astrojs/react enabled. (6.0.6) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%406.0.6)

## @astrojs/react 5

### Breaking changes

- Temporary support for Node >=20.19.1 was removed because Stackblitz now uses Node 22 by default. (5.0.1) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%405.0.1)
- The minimum Node.js version is increased to 22.12.0. (5.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%405.0.0)
- Astro v6 upgrades Vite as the development server and production bundler. (5.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%405.0.0)

### Performance

- Improves the performance of rendering static HTML content in React. (5.0.2) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%405.0.2)

### Behavior and default changes

- The Node.js version requirement is lowered to support running on StackBlitz until it supports v22. (5.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%405.0.0)

### Tooling

- The React Vite plugin is updated to v5. (5.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%405.0.0)

### Fixes and other changes

- Filters auto-generated preload resources from Astro island HTML so React Float links are injected into the head and HTML remains valid. (5.0.3) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%405.0.3)
- Fixes React hydration errors when rendering slots conditionally. (5.0.2) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%405.0.2)
- Fixes hydration mismatches when using experimentalReactChildren. (5.0.2) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%405.0.2)
- React component identification improves when configuring include or exclude options alongside multiple JSX frameworks. (5.0.0) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%405.0.0)

## @astrojs/react 4

### Security

- Updates the Vite version to fix a CVE, improving build-tool security for developers. (4.4.1) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%404.4.1)

### New APIs and options

- Adds a client hydration entrypoint to the returned object, enabling client-side interactivity without manually calling container.addClientRenderer(). (4.4.2) — [release notes](https://github.com/withastro/astro/releases/tag/%40astrojs/react%404.4.2)
