Skip to content

chore(docs): add mention that React will drop all extraneous props when using precedence with <style> #7643

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

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

samcx
Copy link
Contributor

@samcx samcx commented Feb 21, 2025

Why?

When React hoists style rules using <style precedence="..." href="...">{...rules}</style> it does not accept arbitrary props.

This behavior should be additionally mentioned in https://react.dev/reference/react-dom/components/style#special-rendering-behavior.

…r <style> when using the `precedence` property
Copy link

vercel bot commented Feb 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
19-react-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 10:09pm
react-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 10:09pm

Copy link

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@gnoff gnoff merged commit dcaf07e into reactjs:main Feb 22, 2025
10 checks passed
@samcx samcx deleted the sam/docs/special-rendering-behavior branch February 22, 2025 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants