-
Notifications
You must be signed in to change notification settings - Fork 129
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 Button and IconButton RSC compatibility #2982
Conversation
🦋 Changeset detectedLatest commit: 167a8e9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2982 +/- ##
=======================================
Coverage 87.63% 87.63%
=======================================
Files 229 229
Lines 13082 13082
Branches 1764 1764
=======================================
Hits 11464 11464
Misses 1561 1561
Partials 57 57
🚀 New features to boost your workflow:
|
Size Change: +14 B (0%) Total Size: 707 kB
ℹ️ View Unchanged
|
Purpose
We received a report that the Button component throws an error when rendered inside a React Server Component (RSC). I discovered that it and the IconButton component are missing the
'use client'
directive. It should have been added automatically byeslint-plugin-react-server-components
, I suspect that didn't happen because thecreateButtonComponent
factory function abstracts away the client logic.Approach and changes
'use client'
directive to the Button and IconButton componentsDefinition of done