@astrojs/react
7.1.9 · 13 Nov 2026MIT4M / weekRepositoryHomepagenpmAtom feed
109 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 7.x · latest line
7.1.9
13 Nov 2026Unpins
@astrojs/*dependencies to allow versions matching the^range to be installed
Patch Changes
Unpins
@astrojs/*dependencies to allow versions matching the^range to be installed
7.1.6 – 7.1.83 releases that only update dependencies@astrojs/react-renderer 0.1.2@astrojs/internal-helpers 0.13.2Show each
7.1.5
9 Nov 2026Expands the peer dependency version range for
oxc-transform-reactfrom^0.145.0to>=0.145.0 <0.157.0.
7.1.4
5 Nov 2026Only updates a dependency:@astrojs/internal-helpers 0.13.1
7.1.3
5 Nov 2026Preserves component-rendered resource links, including stylesheets, preloads, and modulepreloads, in React island output. Automatic React resource hints are also preserved so that authored links are not removed during server rendering.
7.1.2
28 Oct 2026Fixes duplicate
React.useId()values across components whenexperimentalDisableStreamingis enabled
7.1.1
21 Oct 2026- Breaking
Bumps the minimum supported Node.js version to 22.23.4, which includes the fixes from the October 2026 Node.js security releases
This is a patch release because the Node.js support and upgrade policy allows the Core team to raise the minimum Maintenance LTS version in a patch release when a disclosed and fixed Node.js security flaw affects Astro.
7.1.0
15 Oct 2026- Breaking
Increases the minimum Node.js version to 22.22.0
The minimum supported Node.js version is now 22.22.0, the latest Node.js 22 release supported by StackBlitz. This change is in line with Astro's Node.js support policy.
Minor Changes
- Breaking
Increases the minimum Node.js version to 22.22.0
The minimum supported Node.js version is now 22.22.0, the latest Node.js 22 release supported by StackBlitz. This change is in line with Astro's Node.js support policy.
7.0.1
6 Oct 2026Only updates a dependency:@astrojs/internal-helpers 0.12.0
7.0.0
22 Sep 2026- Breaking
Migrates the React integration to
@vitejs/plugin-reactv6, using Oxc for JSX and Fast Refresh. Removes thebabelintegration option; projects with custom Babel transforms must configure@rolldown/plugin-babelundervite.pluginsinstead.Adds an opt-in
compileroption for the Oxc-based React Compiler. Installoxc-transform-reactand enable it in your Astro config:import react from '@astrojs/react'; export default { integrations: [react({ compiler: true })], };The compiler memoizes client components and hooks. Server rendering is not compiled. The target defaults to the installed React major version; React 17 and 18 projects also need
react-compiler-runtimeinstalled. Pass an options object to configure the compiler, for examplecompiler: { compilationMode: 'annotation' }. The integration'sincludeandexcludeoptions apply, and dependencies and Astro files are excluded.
Major Changes
- Breaking
Migrates the React integration to
@vitejs/plugin-reactv6, using Oxc for JSX and Fast Refresh. Removes thebabelintegration option; projects with custom Babel transforms must configure@rolldown/plugin-babelundervite.pluginsinstead.Adds an opt-in
compileroption for the Oxc-based React Compiler. Installoxc-transform-reactand enable it in your Astro config:import react from '@astrojs/react'; export default { integrations: [react({ compiler: true })], };The compiler memoizes client components and hooks. Server rendering is not compiled. The target defaults to the installed React major version; React 17 and 18 projects also need
react-compiler-runtimeinstalled. Pass an options object to configure the compiler, for examplecompiler: { compilationMode: 'annotation' }. The integration'sincludeandexcludeoptions apply, and dependencies and Astro files are excluded.
Migrating custom Babel transforms
The integration uses
@vitejs/plugin-reactv6 and Oxc for JSX and Fast Refresh. Thebabelintegration option has been removed in this major release.If you use custom Babel transforms, install
@rolldown/plugin-babeland@babel/core, keeping your existing Babel plugins and presets installed:pnpm add -D @rolldown/plugin-babel @babel/core
Move your Babel plugins and presets from
react({ babel: ... })tobabel()invite.plugins. For example, migrate a project usingbabel-plugin-styled-componentsfrom:import react from '@astrojs/react'; import { defineConfig } from 'astro/config'; export default defineConfig({ integrations: [react({ babel: { plugins: ['babel-plugin-styled-components'] } })], });To:
import react from '@astrojs/react'; import babel from '@rolldown/plugin-babel'; import { defineConfig } from 'astro/config'; export default defineConfig({ integrations: [react()], vite: { plugins: [ babel({ plugins: ['babel-plugin-styled-components'], }), ], }, });This also works with
react({ compiler: true }). Babel runs before Oxc transforms TypeScript and JSX. The Babel plugin automatically enables parsing for.jsx,.ts, and.tsxfiles. It does not loadbabel.config.jsor.babelrcfiles; pass the options directly tobabel(). The oldbabelcallback is not supported; use the plugin'soverridesand preset hooks for conditional transforms.Do not enable
babel-plugin-react-compileron the same components as the Oxc compiler.- 6.x
6.0.6
16 Sep 2026Fixes Vue render-function components failing to build when
@astrojs/reactis also enabled. React's renderercheckno longer crashes on non-React object components, and Vue'schecknow recognizesdefineComponent()components that use asetupfunction returning a render function.
6.0.1 – 6.0.55 releases that only update dependencies@astrojs/internal-helpers 0.11.0Show each
- 6.0.531 Aug 2026@astrojs/internal-helpers 0.11.0
- 6.0.419 Aug 2026@astrojs/internal-helpers 0.10.4
- 6.0.318 Aug 2026@astrojs/internal-helpers 0.10.3
- 6.0.228 Jul 2026@astrojs/internal-helpers 0.10.2
- 6.0.12 Jul 2026@astrojs/internal-helpers 0.10.1
6.0.0
22 Jun 2026- Breaking
Upgrade to Vite v8
Replaces the import entrypoint of
getContainerRenderer()A new
container-rendererentrypoint exportinggetContainerRenderer()has been added to the following integrations: React, Preact, Svelte, SolidJS, Vue, and MDX. This prevents bundlers from trying to bundle unrelated exports from the package root when only the Container API is used.If you are using the Container API, update your import statements to use the new entrypoint. The following example updates the
getContainerRenderer()import for React:- import { getContainerRenderer } from '@astrojs/react'; + import { getContainerRenderer } from '@astrojs/react/container-renderer';Importing
getContainerRenderer()from the package root still works, but is now deprecated and logs a warning.Triggers beta prereleases for packages that are still on alpha
- 5.x
5.0.7
2 Jun 2026Bumps
devaluedependency to v5.8.1
5.0.4 – 5.0.63 releases that only update dependencies@astrojs/internal-helpers 0.10.0Show each
- 5.0.628 May 2026@astrojs/internal-helpers 0.10.0
- 5.0.513 May 2026@astrojs/internal-helpers 0.9.1
- 5.0.422 Apr 2026@astrojs/internal-helpers 0.9.0
5.0.3
6 Apr 2026Fix React 19 "Float" mechanism injecting <link rel="preload"> into Astro islands instead of the <head>. This PR adds a filter to @astrojs/react to strip these auto-generated resource from the island's HTML output, ensuring valid HTML structure.
5.0.2
26 Mar 2026Fix React hydration errors when using conditional slot rendering
Fixes hydration mismatch when using
experimentalReactChildrenRefactors to improve the performance of rendering static HTML content in React
5.0.1
18 Mar 2026Removes temporary support for Node >=20.19.1 because Stackblitz now uses Node 22 by default
5.0.0
10 Mar 2026- Breaking
Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance)
- Breaking
Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Update to Astro 6 beta
Major Changes
- Breaking
Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance)
- Breaking
Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)
Patch Changes
Update to Astro 6 beta
Lower the Node version requirement to allow running on Stackblitz until it supports v22
Improves how React components are identified when setting the
includeand/orexcludeoptions in projects where multiple JSX frameworks are used together
- 4.x
4.4.2
6 Nov 2025Adds support for client hydration in
getContainerRenderer()The
getContainerRenderer()function is exported by Astro framework integrations to simplify the process of rendering framework components when using the experimental Container API inside a Vite or Vitest environment. This update adds the client hydration entrypoint to the returned object, enabling client-side interactivity for components rendered using this function. Previously this required users to manually callcontainer.addClientRenderer()with the appropriate client renderer entrypoint.See the
container-with-vitestdemo for a usage example, and the Container API documentation for more information on using framework components with the experimental Container API.
4.4.1
28 Oct 2025Updates
viteversion to fix CVE
4.4.0
25 Sep 2025Stabilizes the formerly experimental
getActionState()andwithState()functions introduced in@astrojs/reactv3.4.0 used to integrate Astro Actions with React 19'suseActionState()hook.This example calls a
likeaction that accepts apostIdand returns the number of likes. Pass this action to thewithState()function to apply progressive enhancement info, and apply touseActionState()to track the result:import { actions } from 'astro:actions'; import { withState } from '@astrojs/react/actions'; import { useActionState } from 'react'; export function Like({ postId }: { postId: string }) { const [state, action, pending] = useActionState( withState(actions.like), 0, // initial likes ); return ( <form action={action}> <input type="hidden" name="postId" value={postId} /> <button disabled={pending}>{state} ❤️</button> </form> ); }You can also access the state stored by
useActionState()from your action handler. CallgetActionState()with the API context, and optionally apply a type to the result:import { defineAction } from 'astro:actions'; import { z } from 'astro:schema'; import { getActionState } from '@astrojs/react/actions'; export const server = { like: defineAction({ input: z.object({ postId: z.string(), }), handler: async ({ postId }, ctx) => { const currentLikes = getActionState<number>(ctx); // write to database return currentLikes + 1; }, }), };If you were previously using this experimental feature, you will need to update your code to use the new stable exports:
// src/components/Form.jsx import { actions } from 'astro:actions'; -import { experimental_withState } from '@astrojs/react/actions'; +import { withState } from '@astrojs/react/actions'; import { useActionState } from "react";// src/actions/index.ts import { defineAction, type SafeResult } from 'astro:actions'; import { z } from 'astro:schema'; -import { experimental_getActionState } from '@astrojs/react/actions'; +import { getActionState } from '@astrojs/react/actions';
4.3.1
8 Sep 2025Updates
viteversion to fix CVE
4.3.0
22 May 2025- Breaking
Increases minimum Node.js version to 18.20.8
Node.js 18 has now reached end-of-life and should not be used. For now, Astro will continue to support Node.js 18.20.8, which is the final LTS release of Node.js 18, as well as Node.js 20 and Node.js 22 or later. We will drop support for Node.js 18 in a future release, so we recommend upgrading to Node.js 22 as soon as possible. See Astro's Node.js support policy for more details.
:warning: Important note for users of Cloudflare Pages: The current build image for Cloudflare Pages uses Node.js 18.17.1 by default, which is no longer supported by Astro. If you are using Cloudflare Pages you should override the default Node.js version to Node.js 22. This does not affect users of Cloudflare Workers, which uses Node.js 22 by default.
4.2.7
30 Apr 2025Update vite to latest version for fixing CVE
4.2.6
29 Apr 2025Fixes SSR renderer type
4.2.5
23 Apr 2025Improves type-safety of renderers
4.2.4
14 Apr 2025Update vite to latest version to fix CVE
Updates vite to the latest version
4.2.3
31 Mar 2025Update
viteto the latest version
4.2.2
26 Mar 2025Updates the dependency
viteto the latest.
4.2.1
27 Feb 2025Updates
esbuildandviteto the latest to avoid false positives audits warnings caused byesbuild.
4.2.0
27 Jan 2025Adds experimental support for disabling streaming
This is useful to support libraries that are not compatible with streaming such as some CSS-in-JS libraries. To disable streaming for all React components in your project, set
experimentalDisableStreaming: trueas a configuration option for@astrojs/react:// astro.config.mjs import { defineConfig } from 'astro/config'; import react from '@astrojs/react'; export default defineConfig({ integrations: [ react({ + experimentalDisableStreaming: true, }), ], });
4.1.6
20 Jan 2025Removes hardcoded
ssr.external: ['react-dom/server', 'react-dom/client']config that causes issues with adapters that bundle all dependencies (e.g. Cloudflare). These externals should already be inferred by default by Vite when deploying to a server environment.Upgrades Vite
4.1.5
15 Jan 2025Adds a warning message when multiple JSX-based UI frameworks are being used without either the
includeorexcludeproperty being set on the integration.
4.1.4
13 Jan 2025- Removed
Removes react-specific entrypoints in
optimizeDeps.includeand rely on@vitejs/plugin-reactto add
4.1.3
10 Jan 2025Supports checking for React 19 components
4.1.2
20 Dec 2024Upgrades Vite to pin esbuild
4.1.1
16 Dec 2024Preoptimize React compiler runtime
4.1.0
11 Dec 2024Add React 19 stable to peer dependencies
4.0.0
3 Dec 2024- Breaking
Updates Vite dependency to v6 to match Astro v5
- Removed
Drops node 21 support
- Security
Changes the generated URL query param from
_astroActionto_actionwhen submitting a form using Actions. This avoids leaking the framework name into the URL bar, which may be considered a security issue.
- 3.x
3.6.3
21 Nov 2024Resolve
vitepeer dependency problem for strict package managers like Yarn in PnP mode.
3.6.2
9 Aug 2024Prevents throwing errors when checking if a component is a React component in runtime
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.