-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 usage for exports #4385
Fix invalid hook usage for exports #4385
Conversation
🦋 Changeset detectedLatest commit: d3f0fcc The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 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 |
@krolebord Does this prevent a warning? |
@matthewp It does, tested it on my project, and the build completed without any warnings Before
After
|
Also added support for:
And
|
Changes
Closes #4220
Fixes warning when using hooks inside the react components not exported as a function declaration
Adds proper support for react components exported as
Testing
Tested manually.
I would like to add tests if needed, just unsure of how to test for warnings in the build output
Docs
No changes in docs needed