Repository navigation
docs: prefer React elements for slot-based props - #8490
Conversation
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
|
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
joshblack
left a comment
There was a problem hiding this comment.
@copilot update the style-guide skill to include instructions on how to update it. The skill itself should be minimal, with the table linking out to topics. When updating or adding to the skill, things should go under existing topics or new topics. This addition should be under a new topic for component prop types
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Updated in ac37b2c: |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The documentation is accurate, consistent with the referenced API direction, and requires no changeset.
Review effort: Balanced
Findings: None
What changed in this PR
Documents preferred React element usage for slot-based props, improving Server/Client Component interoperability without API changes.
Changes:
- Adds prop-type guidance and examples.
- Links the guidance from the style-guide index.
| File | Description |
|---|---|
.github/skills/style-guide/SKILL.md |
Adds the prop-types topic and maintenance guidance. |
.github/skills/style-guide/docs/component-prop-types.md |
Documents element-based slot prop conventions. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Head branch was pushed to by a user without write access
Updated the style-guide topic to recommend |
Co-authored-by: joshblack <3901764+joshblack@users.noreply.github.com>
Codify the guidance from #8450: prefer React elements for slot-based props such as
leadingVisual,trailingVisual, andicon, enabling composition across Server/Client Component boundaries.Changelog
New
ReactElementfromReactNodeand reserve render props for state-dependent content.Changed
Removed
None.
Rollout strategy
Testing & Reviewing
Review the new Props guidance against #8450; no component APIs change.