Skip to content

Latest commit

 

History

History
535 lines (292 loc) · 26.9 KB

CHANGELOG.md

File metadata and controls

535 lines (292 loc) · 26.9 KB

@astrojs/react

3.3.4

Patch Changes

  • #10986 4d16381 Thanks @emish89! - Fixes incorrect peerDependencies for @types/react and @types/react-dom

3.3.3

Patch Changes

3.3.2

Patch Changes

3.3.1

Patch Changes

3.3.0

Minor Changes

3.2.0

Minor Changes

3.1.1

Patch Changes

3.1.0

Minor Changes

  • #10136 9cd84bd19b92fb43ae48809f575ee12ebd43ea8f Thanks @matthewp! - Changes the default behavior of transition:persist to update the props of persisted islands upon navigation. Also adds a new view transitions option transition:persist-props (default: false) to prevent props from updating as needed.

    Islands which have the transition:persist property to keep their state when using the <ViewTransitions /> router will now have their props updated upon navigation. This is useful in cases where the component relies on page-specific props, such as the current page title, which should update upon navigation.

    For example, the component below is set to persist across navigation. This component receives a products props and might have some internal state, such as which filters are applied:

    <ProductListing transition:persist products={products} />

    Upon navigation, this component persists, but the desired products might change, for example if you are visiting a category of products, or you are performing a search.

    Previously the props would not change on navigation, and your island would have to handle updating them externally, such as with API calls.

    With this change the props are now updated, while still preserving state.

    You can override this new default behavior on a per-component basis using transition:persist-props=true to persist both props and state during navigation:

    <ProductListing transition:persist-props="true" products={products} />

3.0.10

Patch Changes

3.0.9

Patch Changes

3.0.8

Patch Changes

3.0.7

Patch Changes

3.0.7-beta.0

Patch Changes

3.0.6

Patch Changes

  • #9141 af43fb517 Thanks @lilnasy! - Fixes an issue where slotting self-closing elements (img, br, hr) into react components with experimentalReactChildren enabled led to an error.

3.0.5

Patch Changes

3.0.4

Patch Changes

3.0.3

Patch Changes

3.0.2

Patch Changes

3.0.1

Patch Changes

3.0.0

Major Changes

  • #8188 d0679a666 Thanks @ematipico! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.

  • #8179 6011d52d3 Thanks @matthewp! - Astro 3.0 Release Candidate

  • #7924 519a1c4e8 Thanks @matthewp! - Support for React Refresh

    The React integration now fully supports React Refresh and is backed by @vitejs/plugin-react.

    Also included in this change are new include and exclude config options. Use these if you want to use React alongside another JSX framework; include specifies files to be compiled for React and exclude does the opposite.

Patch Changes

3.0.0-rc.6

Patch Changes

3.0.0-rc.5

Patch Changes

3.0.0-rc.4

Major Changes

Patch Changes

3.0.0-beta.3

Minor Changes

  • #8082 16a3fdf93 Thanks @matthewp! - Optionally parse React slots as React children.

    This adds a new configuration option for the React integration experimentalReactChildren:

    export default {
      integrations: [
        react({
          experimentalReactChildren: true,
        }),
      ],
    };

    With this enabled, children passed to React from Astro components via the default slot are parsed as React components.

    This enables better compatibility with certain React components which manipulate their children.

3.0.0-beta.2

Patch Changes

3.0.0-beta.1

Major Changes

  • #7924 519a1c4e8 Thanks @matthewp! - Support for React Refresh

    The React integration now fully supports React Refresh and is backed by @vitejs/plugin-react.

    Also included in this change are new include and exclude config options. Use these if you want to use React alongside another JSX framework; include specifies files to be compiled for React and exclude does the opposite.

3.0.0-beta.0

Major Changes

  • 1eae2e3f7 Thanks @Princesseuh! - Remove support for Node 16. The lowest supported version by Astro and all integrations is now v18.14.1. As a reminder, Node 16 will be deprecated on the 11th September 2023.

2.3.2

Patch Changes

2.3.1

Patch Changes

2.3.0

Minor Changes

  • #8082 16a3fdf93 Thanks @matthewp! - Optionally parse React slots as React children.

    This adds a new configuration option for the React integration experimentalReactChildren:

    export default {
      integrations: [
        react({
          experimentalReactChildren: true,
        }),
      ],
    };

    With this enabled, children passed to React from Astro components via the default slot are parsed as React components.

    This enables better compatibility with certain React components which manipulate their children.

2.2.2

Patch Changes

  • #8075 da517d405 Thanks @SudoCat! - fix a bug where react identifierPrefix was set to null for client:only components causing React.useId to generate ids prefixed with null

2.2.1

Patch Changes

2.2.0

Minor Changes

  • #7093 3d525efc9 Thanks @matthewp! - Prevent removal of nested slots within islands

    This change introduces a new flag that renderers can add called supportsAstroStaticSlot. What this does is let Astro know that the render is sending <astro-static-slot> as placeholder values for static (non-hydrated) slots which Astro will then remove.

    This change is completely backwards compatible, but fixes bugs caused by combining ssr-only and client-side framework components like so:

    <Component>
      <div>
        <Component client:load>
          <span>Nested</span>
        </Component>
      </div>
    </Component>

Patch Changes

2.1.3

Patch Changes

2.1.2

Patch Changes

2.1.1

Patch Changes

2.1.0

Minor Changes

2.0.2

Patch Changes

2.0.1

Patch Changes

2.0.0

Major Changes

2.0.0-beta.0

See changes in 2.0.0-beta.0

Major Changes

1.2.2

Patch Changes

1.2.1

Patch Changes

1.2.0

Minor Changes

  • #5016 6efeaeb39 Thanks @matthewp! - Add support for mui

    This adds support for mui through configuration. Users will now not need to configure this library to get it to work.

1.1.4

Patch Changes

1.1.3

Patch Changes

1.1.2

Patch Changes

1.1.1

Patch Changes

1.1.0

Minor Changes

  • #4478 243525b15 Thanks @matthewp! - Uses startTransition on React roots

    This prevents hydration from blocking the main thread when multiple islands are rendering at the same time.

1.1.0-next.0

Minor Changes

  • #4478 243525b15 Thanks @matthewp! - Uses startTransition on React roots

    This prevents hydration from blocking the main thread when multiple islands are rendering at the same time.

1.0.0

Major Changes

0.4.3

Patch Changes

0.4.2

Patch Changes

0.4.1

Patch Changes

0.4.0

Minor Changes

0.3.1

Patch Changes

0.3.0

Minor Changes

0.2.1

Patch Changes

0.2.0

Minor Changes

  • #3652 7373d61c Thanks @natemoo-re! - Add support for passing named slots from .astro => framework components.

    Each slot is be passed as a top-level prop. For example:

    // From .astro
    <Component>
      <h2 slot="title">Hello world!</h2>
      <h2 slot="slot-with-dash">Dash</h2>
      <div>Default</div>
    </Component>;
    
    // For .jsx
    export default function Component({ title, slotWithDash, children }) {
      return (
        <>
          <div id="title">{title}</div>
          <div id="slot-with-dash">{slotWithDash}</div>
          <div id="main">{children}</div>
        </>
      );
    }

0.1.3

Patch Changes

  • #3455 e9a77d86 Thanks @natemoo-re! - Update client hydration to check for ssr attribute. Requires astro@^1.0.0-beta.36.

0.1.2

Patch Changes

  • #3337 678c2b75 Thanks @bholmesdev! - Fix: remove hydration failures on React v18 by exposing the "client" directive from Astro core.

0.1.1

Patch Changes

0.1.0

Minor Changes

0.0.2

Patch Changes

  • #2847 3b621f7a Thanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site

0.0.2-next.0

Patch Changes

  • #2847 3b621f7a Thanks @tony-sull! - Adds keywords to the official integrations to support discoverability on Astro's Integrations site