react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

docs: document how React handles HTML attributes in JSX

Open suii2210 opened this issue 1 month ago • 2 comments

This PR adds a new subsection "How React Handles HTML Attributes" to
src/content/learn/writing-markup-with-jsx.md.

It documents:

  • JSX vs HTML attribute name differences (className, htmlFor)
  • boolean attributes
  • inline style objects
  • data-* and aria-* attributes
  • handling unknown/custom attributes and helpful tips

Fixes reactjs/react.dev#80.

suii2210 avatar Nov 14 '25 19:11 suii2210

Hi @suii2210!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

meta-cla[bot] avatar Nov 14 '25 19:11 meta-cla[bot]

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! 🙌

github-actions[bot] avatar Nov 14 '25 19:11 github-actions[bot]