Skip to content

chore(astro): Drop convenience Astro wrappers for React - #3682

Merged
wobsoriano merged 4 commits into
mainfrom
rob/drop-react-wrapper-components
Jul 10, 2024
Merged

chore(astro): Drop convenience Astro wrappers for React#3682
wobsoriano merged 4 commits into
mainfrom
rob/drop-react-wrapper-components

Conversation

@wobsoriano

@wobsoriano wobsoriano commented Jul 9, 2024

Copy link
Copy Markdown
Member

Description

We have 3 ways of importing Astro/React Clerk components (docs WIP):

  1. import { } from '@clerk/astro/components/{control|interactive|unstyled}' - Fully Astro components.
  2. import { } from '@clerk/astro/client/react' - React components. Needs the client:load directive when imported in an Astro component to be hydrated.
  3. import { } from '@clerk/astro/components/react - Astro components that wrap option 2 with the client:load directive for convenience.

Multiple import methods can confuse users. Some features, like theasChild prop for unstyled components, don't work when React components are used in Astro due to Astro's slot system and islands architecture. As a result, we're discontinuing option 3.

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@changeset-bot

changeset-bot Bot commented Jul 9, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 32032bc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clerk/astro Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wobsoriano wobsoriano changed the title chore(astro): Drop immediately hydrated React wrapper components chore(astro): Drop hydrated React wrapper components Jul 9, 2024
@wobsoriano wobsoriano changed the title chore(astro): Drop hydrated React wrapper components chore(astro): Drop hydrated React components Jul 9, 2024
@wobsoriano wobsoriano changed the title chore(astro): Drop hydrated React components chore(astro): Drop convenience Astro wrappers for React Jul 9, 2024
@wobsoriano
wobsoriano marked this pull request as ready for review July 10, 2024 01:38
@wobsoriano
wobsoriano requested a review from panteliselef July 10, 2024 01:38

@panteliselef panteliselef left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹

@wobsoriano
wobsoriano merged commit 1f79d3d into main Jul 10, 2024
@wobsoriano
wobsoriano deleted the rob/drop-react-wrapper-components branch July 10, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants