Skip to content

docs(skill): prefer React 19 ref-as-prop over forwardRef#746

Merged
paanSinghCoder merged 1 commit intomainfrom
docs/skill-react-19-pattern
Apr 21, 2026
Merged

docs(skill): prefer React 19 ref-as-prop over forwardRef#746
paanSinghCoder merged 1 commit intomainfrom
docs/skill-react-19-pattern

Conversation

@paanSinghCoder
Copy link
Copy Markdown
Contributor

Summary

  • Apsara runs on React 19 and no existing component uses forwardRef/ElementRef — the add-new-component skill was still recommending the legacy pattern for new work
  • Updates the component template, Object.assign snippet, Base UI Content template, and quality checklist in .claude/skills/add-new-component/SKILL.md to match the actual convention (plain function components + ComponentProps<'tag'> / Primitive.*.Props typings)
  • ref flows through ...props automatically; destructure explicitly only when it must target a non-default nested element (e.g. the Popup inside Portal/Positioner)

Test plan

  • Skim the updated templates in SKILL.md for internal consistency
  • Confirm the rule aligns with existing components (e.g. Callout, Toolbar, Box, FilterChip)

🤖 Generated with Claude Code

Apsara is on React 19, and no existing component uses
`forwardRef`/`ElementRef`. Update the add-new-component skill so the
component template, Object.assign snippet, and Base UI Content template
use plain function components with `ComponentProps<'tag'>` /
`Primitive.*.Props` typings; `ref` flows through the spread
automatically or is destructured when it must target a non-default
element.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
apsara Ready Ready Preview, Comment Apr 20, 2026 10:40am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 20, 2026

Warning

Rate limit exceeded

@paanSinghCoder has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 48 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 57 minutes and 48 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c6ed3875-18fe-4821-a612-548c968f5535

📥 Commits

Reviewing files that changed from the base of the PR and between 4ccb30c and 3c961a6.

📒 Files selected for processing (1)
  • .claude/skills/add-new-component/SKILL.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@paanSinghCoder paanSinghCoder merged commit 628f237 into main Apr 21, 2026
5 checks passed
@paanSinghCoder paanSinghCoder deleted the docs/skill-react-19-pattern branch April 21, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants