-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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: Invalid hook call when user use export jsx function #4831
Conversation
🦋 Changeset detectedLatest commit: b1c1b55 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking because this is marked as major.
.changeset/cyan-chefs-marry.md
Outdated
@@ -0,0 +1,5 @@ | |||
--- | |||
'astro': major |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this marked as major
? Was that a mistake? I think this can be a patch
because it fixes a bug, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right! Accepted
Thanks so much, this looks great! Love all the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is amazing, thank you for the fix! If you can mark this as patch
we'll get this released ASAP.
CI / Test: macos-latest (node@14) Failed for |
@yuhang-dong these tests can be flakey, I think I just need to rerun it. |
Changes
vite-plugin-jsx/tag.ts
for understanding ofexport {X}
,export const X
,export default const X
and so on. You can see the full list fromastro/test/react-jsx-export.test.js
andastro/test/fixtures/react-jsx-export
Anonymous Function Default Export
andAnonymous Arrow Function Default Export
.Testing
You can see the full tests from
astro/test//react-jsx-export.test.js
andastro/test/fixtures/react-jsx-export
.The test will prevent react warning like below:
Docs
This is not affect a user's behavior, so we don't need to update docs.