You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Patch Changes
#17027241250b Thanks @ocavue! - Triggers beta prereleases for packages that are still on alpha
#16224a2b9eeb Thanks @fkatsuhiro! - Fix React 19 "Float" mechanism injecting into Astro islands instead of the . This PR adds a filter to @astrojs/react to strip these auto-generated resource from the island's HTML output, ensuring valid HTML structure.
#1526411efb05 Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22
#157004e7f3e8 Thanks @ocavue! - Improves how React components are identified when setting the include and/or exclude options in projects where multiple JSX frameworks are used together
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.
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:
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';
Next steps: Take a moment to review the security alert above. Review
the linked package source code to understand the potential risk. Ensure the
package is not malicious before proceeding. If you're unsure how to proceed,
reach out to your security team or ask the Socket team for help at
support@socket.dev.
Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.
Mark the package as acceptable risk. To ignore this alert only
in this pull request, reply with the comment
@SocketSecurity ignore npm/@emnapi/runtime@1.11.1. You can
also ignore all packages with @SocketSecurity ignore-all.
To ignore an alert for all future pull requests, use Socket's Dashboard to
change the triage state of this alert.
renovateBot
changed the title
chore(deps): update devdependency @astrojs/react to v5
chore(deps): update devdependency @astrojs/react to v6
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependenciesPull requests that update a dependency
0 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^4.3.0→^6.0.0Release Notes
withastro/astro (@astrojs/react)
v6.0.0Compare Source
Major Changes
cafec4eThanks @delucis! - Upgrade to Vite v8Minor Changes
#17093
4585fe5Thanks @Princesseuh! - Replaces the import entrypoint ofgetContainerRenderer()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:Importing
getContainerRenderer()from the package root still works, but is now deprecated and logs a warning.Patch Changes
241250bThanks @ocavue! - Triggers beta prereleases for packages that are still on alphav5.0.7Compare Source
Patch Changes
17a0fbdThanks @ocavue! - Bumpsdevaluedependency to v5.8.1v5.0.6Compare Source
Patch Changes
f732f3c]:v5.0.5Compare Source
Patch Changes
d365c97]:v5.0.4Compare Source
Patch Changes
99464ed,f3485c3]:v5.0.3Compare Source
Patch Changes
a2b9eebThanks @fkatsuhiro! - Fix React 19 "Float" mechanism injecting into Astro islands instead of the . This PR adds a filter to @astrojs/react to strip these auto-generated resource from the island's HTML output, ensuring valid HTML structure.v5.0.2Compare Source
Patch Changes
#15378
a8a926eThanks @dmgawel! - Fix React hydration errors when using conditional slot rendering#15146
f771f75Thanks @kedarvartak! - Fixes hydration mismatch when usingexperimentalReactChildren#14917
769265bThanks @sanjaiyan-dev! - Refactors to improve the performance of rendering static HTML content in Reactv5.0.1Compare Source
Patch Changes
d3c7de9Thanks @florian-lefebvre! - Removes temporary support for Node >=20.19.1 because Stackblitz now uses Node 22 by defaultv5.0.0Compare Source
Major Changes
#14427
e131261Thanks @florian-lefebvre! - Increases minimum Node.js version to 22.12.0 - (v6 upgrade guidance)#14445
ecb0b98Thanks @florian-lefebvre! - Astro v6.0 upgrades to Vite v7.0 as the development server and production bundler - (v6 upgrade guidance)Minor Changes
72f7960Thanks @ocavue! - Update@vitejs/plugin-reactto v5.Patch Changes
#15187
bbb5811Thanks @matthewp! - Update to Astro 6 beta#15264
11efb05Thanks @florian-lefebvre! - Lower the Node version requirement to allow running on Stackblitz until it supports v22#15700
4e7f3e8Thanks @ocavue! - Improves how React components are identified when setting theincludeand/orexcludeoptions in projects where multiple JSX frameworks are used togetherUpdated dependencies [
4ebc1e3,4e7f3e8,a164c77,cf6ea6b,a18d727,240c317,745e632]:v4.4.2Compare Source
Patch Changes
#14715
3d55c5dThanks @ascorbic! - Adds support for client hydration ingetContainerRenderer()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.v4.4.1Compare Source
Patch Changes
e3175d9Thanks @GameRoMan! - Updatesviteversion to fix CVEv4.4.0Compare Source
Minor Changes
#14386
f75f446Thanks @yanthomasdev! - Stabilizes the formerly experimentalgetActionState()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: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: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';v4.3.1Compare Source
Patch Changes
c24a8f4Thanks @jsparkdev! - Updatesviteversion to fix CVEConfiguration
📅 Schedule: (in timezone Europe/Copenhagen)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.