fix(system-rsc): extendVariants typescript type#4291
Conversation
🦋 Changeset detectedLatest commit: 53a16f2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 35 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 |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@shlyamster is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes in this pull request focus on updating type declarations in the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
.changeset/twelve-ducks-thank.md (1)
5-5: Enhance the changeset description for better clarityThe description could be more informative about the specific changes and their impact.
Consider expanding the description like this:
-Fix data type returned by the extendVariants function (#4269) +Fix data type returned by the extendVariants function from ForwardRefRenderFunction to ForwardRefExoticComponent for React 18/19 compatibility (#4269)🧰 Tools
🪛 LanguageTool
[uncategorized] ~5-~5: You might be missing the article “the” here.
Context: ...@nextui-org/system-rsc": minor --- Fix data type returned by the extendVariants fun...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
📒 Files selected for processing (1)
.changeset/twelve-ducks-thank.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
.changeset/twelve-ducks-thank.md
[uncategorized] ~5-~5: You might be missing the article “the” here.
Context: ...@nextui-org/system-rsc": minor --- Fix data type returned by the extendVariants fun...
(AI_EN_LECTOR_MISSING_DETERMINER_THE)
🔇 Additional comments (1)
.changeset/twelve-ducks-thank.md (1)
1-3: LGTM: Version bump is appropriate
The minor version bump is correct as this changes type definitions in a backward-compatible way.
|
@wingkwong please review & check |
* fix: ReactElement type * fix: extendVariants forwardRef return type * feat: add changeset * chore(changeset): change to patch --------- Co-authored-by: աӄա <wingkwong.code@gmail.com>
Closes #4269
📝 Description
This request solves the problem of the data type returned by the
extendVariantsfunction.⛳️ Current behavior (updates)
In the current implementation, the result of the
extendVariantsfunction is theForwardRefRenderFunctiondata type.🚀 New behavior
Because the resolution of the function is
forwardRef, therefore it is necessary to return theForwardRefExoticComponentdata type.💣 Is this a breaking change (Yes/No):
These changes work with
react/typesversions 18 and 19. And they don't break backward compatibility.Summary by CodeRabbit
ExtendVariantstype to streamline props structure.extendVariantsfunction to ensure it meets expected standards.