Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Preact Forwarded Ref components not working in astro files when React integration is enabled #9403

Merged
merged 7 commits into from
Dec 18, 2023

Conversation

knpwrs
Copy link
Contributor

@knpwrs knpwrs commented Dec 11, 2023

Changes

Fixes #9402

Preact's forwardRef from preact/compat can return function components which forward refs, which React does not support (React forward ref components are always objects, never functions, even when forwardRef is wrapping a function component).

Testing

I have not tested this change. What would qualify as a sufficient test as far as the astro maintainers are concerned?

Docs

No need for docs, this just prevents the React integration from picking up Preact components that it cannot render.

Copy link

changeset-bot bot commented Dec 11, 2023

🦋 Changeset detected

Latest commit: a800f7c

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

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

@github-actions github-actions bot added pkg: react Related to React (scope) pkg: integration Related to any renderer integration (scope) labels Dec 11, 2023
@github-actions github-actions bot added the docs pr A PR that includes documentation for review label Dec 11, 2023
Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

Perfect, thanks for addressing my feedback!

@ematipico ematipico merged commit 7eb9fe8 into withastro:main Dec 18, 2023
13 checks passed
@astrobot-houston astrobot-houston mentioned this pull request Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs pr A PR that includes documentation for review pkg: integration Related to any renderer integration (scope) pkg: react Related to React (scope)
Projects
None yet
3 participants