Packages

@astrojs/react

7.1.9 · 13 Nov 2026MIT4M / weekRepositoryHomepagenpmAtom feed

Your version

109 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 7.x · latest line
  2. 7.1.9

    13 Nov 2026
    • Unpins @astrojs/* dependencies to allow versions matching the ^ range to be installed

  3. 7.1.6 – 7.1.83 releases that only update dependencies@astrojs/react-renderer 0.1.2@astrojs/internal-helpers 0.13.2Show each
  4. 7.1.5

    9 Nov 2026
    • Expands the peer dependency version range for oxc-transform-react from ^0.145.0 to >=0.145.0 <0.157.0.

  5. 7.1.4

    5 Nov 2026

    Only updates a dependency:@astrojs/internal-helpers 0.13.1

  6. 7.1.3

    5 Nov 2026
    • Preserves 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. 7.1.2

    28 Oct 2026
    • Fixes duplicate React.useId() values across components when experimentalDisableStreaming is enabled

  8. 7.1.1

    21 Oct 2026
  9. 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.

  10. 7.0.1

    6 Oct 2026

    Only updates a dependency:@astrojs/internal-helpers 0.12.0

  11. 7.0.0

    22 Sep 2026
    • Breaking

      Migrates the React integration to @vitejs/plugin-react v6, using Oxc for JSX and Fast Refresh. Removes the babel integration option; projects with custom Babel transforms must configure @rolldown/plugin-babel under vite.plugins instead.

      Adds an opt-in compiler option for the Oxc-based React Compiler. Install oxc-transform-react and 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-runtime installed. Pass an options object to configure the compiler, for example compiler: { compilationMode: 'annotation' }. The integration's include and exclude options apply, and dependencies and Astro files are excluded.

  12. 6.x
  13. 6.0.6

    16 Sep 2026
    • Fixes Vue render-function components failing to build when @astrojs/react is also enabled. React's renderer check no longer crashes on non-React object components, and Vue's check now recognizes defineComponent() components that use a setup function returning a render function.

  14. 6.0.1 – 6.0.55 releases that only update dependencies@astrojs/internal-helpers 0.11.0Show each
  15. 6.0.0

    22 Jun 2026
    • Breaking

      Upgrade to Vite v8

    • Replaces the import entrypoint of getContainerRenderer()

      A new container-renderer entrypoint exporting getContainerRenderer() 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

  16. 5.x
  17. 5.0.7

    2 Jun 2026
    • Bumps devalue dependency to v5.8.1

  18. 5.0.4 – 5.0.63 releases that only update dependencies@astrojs/internal-helpers 0.10.0Show each
  19. 5.0.3

    6 Apr 2026
    • Fix 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.

  20. 5.0.2

    26 Mar 2026
    • Fix React hydration errors when using conditional slot rendering

    • Fixes hydration mismatch when using experimentalReactChildren

    • Refactors to improve the performance of rendering static HTML content in React

  21. 5.0.1

    18 Mar 2026
    • Removes temporary support for Node >=20.19.1 because Stackblitz now uses Node 22 by default

  22. 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

  23. 4.x
  24. 4.4.2

    6 Nov 2025
    • Adds 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 call container.addClientRenderer() with the appropriate client renderer entrypoint.

      See the container-with-vitest demo for a usage example, and the Container API documentation for more information on using framework components with the experimental Container API.

  25. 4.4.1

    28 Oct 2025
    • Updates vite version to fix CVE

  26. 4.4.0

    25 Sep 2025
    • Stabilizes the formerly experimental getActionState() and withState() functions introduced in @astrojs/react v3.4.0 used to integrate Astro Actions with React 19's useActionState() hook.

      This example calls a like action that accepts a postId and returns the number of likes. Pass this action to the withState() function to apply progressive enhancement info, and apply to useActionState() 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. Call getActionState() 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';
  27. 4.3.1

    8 Sep 2025
    • Updates vite version to fix CVE

  28. 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.

  29. 4.2.7

    30 Apr 2025
    • Update vite to latest version for fixing CVE

  30. 4.2.6

    29 Apr 2025
    • Fixes SSR renderer type

  31. 4.2.5

    23 Apr 2025
    • Improves type-safety of renderers

  32. 4.2.4

    14 Apr 2025
    • Update vite to latest version to fix CVE

    • Updates vite to the latest version

  33. 4.2.3

    31 Mar 2025
    • Update vite to the latest version

  34. 4.2.2

    26 Mar 2025
    • Updates the dependency vite to the latest.

  35. 4.2.1

    27 Feb 2025
    • Updates esbuild and vite to the latest to avoid false positives audits warnings caused by esbuild.

  36. 4.2.0

    27 Jan 2025
    • Adds 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: true as 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,
          }),
        ],
      });
  37. 4.1.6

    20 Jan 2025
    • Removes 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

  38. 4.1.5

    15 Jan 2025
    • Adds a warning message when multiple JSX-based UI frameworks are being used without either the include or exclude property being set on the integration.

  39. 4.1.4

    13 Jan 2025
    • Removed

      Removes react-specific entrypoints in optimizeDeps.include and rely on @vitejs/plugin-react to add

  40. 4.1.3

    10 Jan 2025
    • Supports checking for React 19 components

  41. 4.1.2

    20 Dec 2024
    • Upgrades Vite to pin esbuild

  42. 4.1.1

    16 Dec 2024
    • Preoptimize React compiler runtime

  43. 4.1.0

    11 Dec 2024
    • Add React 19 stable to peer dependencies

  44. 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 _astroAction to _action when submitting a form using Actions. This avoids leaking the framework name into the URL bar, which may be considered a security issue.

  45. 3.x
  46. 3.6.3

    21 Nov 2024
    • Resolve vite peer dependency problem for strict package managers like Yarn in PnP mode.

  47. 3.6.2

    9 Aug 2024
    • Prevents 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.