Skip to content
This repository was archived by the owner on Nov 3, 2025. It is now read-only.

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Apr 23, 2025

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@astrojs/react (source) 4.2.4 -> 4.4.1 age adoption passing confidence

Release Notes

withastro/astro (@​astrojs/react)

v4.4.1

Compare Source

Patch Changes

v4.4.0

Compare Source

Minor Changes
  • #​14386 f75f446 Thanks @​yanthomasdev! - 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 '@&#8203;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 '@&#8203;astrojs/react/actions';
    +import { withState } from '@&#8203;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 '@&#8203;astrojs/react/actions';
    +import { getActionState } from '@&#8203;astrojs/react/actions';

v4.3.1

Compare Source

Patch Changes

v4.3.0

Compare Source

Minor Changes
  • #​13809 3c3b492 Thanks @​ascorbic! - 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.

    ⚠️ 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.

v4.2.7

Compare Source

Patch Changes

v4.2.6

Compare Source

Patch Changes

v4.2.5

Compare Source

Patch Changes

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

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


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from fe04427 to 01a6bf6 Compare April 29, 2025 17:40
@renovate renovate bot changed the title chore(deps): update dependency @astrojs/react to v4.2.5 chore(deps): update dependency @astrojs/react to v4.2.6 Apr 29, 2025
@renovate renovate bot changed the title chore(deps): update dependency @astrojs/react to v4.2.6 chore(deps): update dependency @astrojs/react to v4.2.7 Apr 30, 2025
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch 2 times, most recently from 85c2c22 to e418657 Compare May 5, 2025 20:56
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from e418657 to 5e7bc7d Compare May 19, 2025 16:55
@renovate renovate bot changed the title chore(deps): update dependency @astrojs/react to v4.2.7 chore(deps): update dependency @astrojs/react to v4.3.0 May 22, 2025
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from 5e7bc7d to 055728c Compare May 28, 2025 09:33
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from 055728c to 5071ffd Compare June 4, 2025 12:02
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from 5071ffd to 47444bc Compare June 22, 2025 15:14
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from 47444bc to 9cd1105 Compare July 2, 2025 19:33
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch 2 times, most recently from 8b3859e to 341ddb7 Compare August 13, 2025 11:47
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from 341ddb7 to b097107 Compare August 19, 2025 14:51
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from b097107 to 9be97bd Compare August 31, 2025 09:59
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from 9be97bd to fd32130 Compare September 8, 2025 21:34
@renovate renovate bot changed the title chore(deps): update dependency @astrojs/react to v4.3.0 chore(deps): update dependency @astrojs/react to v4.3.1 Sep 8, 2025
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from fd32130 to d3d70e1 Compare September 25, 2025 14:57
@renovate renovate bot changed the title chore(deps): update dependency @astrojs/react to v4.3.1 chore(deps): update dependency @astrojs/react to v4.4.0 Sep 25, 2025
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from d3d70e1 to 3abb5f8 Compare October 21, 2025 12:06
@renovate renovate bot force-pushed the renovate/astrojs-react-4.x-lockfile branch from 3abb5f8 to d1e5478 Compare October 28, 2025 20:00
@renovate renovate bot changed the title chore(deps): update dependency @astrojs/react to v4.4.0 chore(deps): update dependency @astrojs/react to v4.4.1 Oct 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant