Skip to content

Conversation

crutchcorn
Copy link
Contributor

This PR aims to document the behavior around React 19 and Custom Elements more accurately. Namely, the previous docs had outdated information regarding property passing.

In the new docs, we cover:

  • Property vs attribute passing
  • How properties are detected by React
  • Event binding and different casing edgecases

Questions

Some open-ended questions that I'd love feedback on from a reviewer:

  1. Should we mention SSR behavior of Custom Elements? If so, what are they? The public proposal document outlines a few paths that may have been taken, but does not clarify which ones were taken in the end.

  2. Should we mention other versions of React and when this support was introduced?

  3. Should this be a dedicated reference page?

Preview of some of the docs

A preview of some of the docs written

Copy link

github-actions bot commented Aug 22, 2025

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

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Can we convert these snippets into sandboxes? Especially the event-handling part would be interesting to see in action.

@crutchcorn
Copy link
Contributor Author

crutchcorn commented Aug 22, 2025

@eps1lon I was thinking the same thing. How is that done? Are there rules around what we should/not do in sandboxes? IE, is alert acceptable?

EDIT: I figured out the <Sandpack> component. Would you like me to add docs for that in CONTRIBUTING.md as well in a different PR?

@crutchcorn
Copy link
Contributor Author

Code samples have been moved to Sandpack

Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice, thank you!

@eps1lon eps1lon merged commit 0a74f01 into reactjs:main Aug 22, 2025
6 checks passed
@eps1lon
Copy link
Member

eps1lon commented Aug 22, 2025

I figured out the component. Would you like me to add docs for that in CONTRIBUTING.md as well in a different PR?

If you think it's helpful. These sort of docs tend to get stale pretty quickly and I thought the Component was straight forward enough to be figured out by looking at existing usage.

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.

2 participants