RFC: Plan for custom element attributes/properties in React 19
This is meant to address #7249. The doc outlines the pros and cons of various approaches React could use to handle attributes and properties on custom elements. # TOC/Summary - Background - Proposals * Option 1: Only set properties + Pros - Easy to understand/implement - Avoids conflict with future global attributes - Takes advantage of custom element "upgrade" - Custom elements treated like any other React component + Cons - Possibly a breaking change - Need ref to set attribute - Not clear how server-side rendering would work * Option 2: Properties-if-available + Pros - Non-breaking change + Cons - Developers need to understand the heuristic - Falling back to attributes may conflict with future globals * Option 3: Differentiate properties with a sigil + Pros - Non-breaking change that developers can opt-in to - Similar to how other libraries handle attributes/properties - The system is explicit + Cons - It’s new syntax - Not clear how server-side rendering would work * Option 4: Add an attributes object + Pros - The system is explicit - Extending syntax may also solve issues with event handling + Cons - It’s new syntax - It may be a breaking change - It may be a larger change than any of the previous proposals * Option 5: An API for consuming custom elements + Pros - The system is explicit - Non-b
Posted by robdodson on Oct 24, 2017, 5:28 AM
Tags
Related issues
- Custom games stuck on "finding server" for all european servers
- Feature request: add ACP (Agent Client Protocol) stdio JSON-RPC mode
- Forza Horizon 6 (2483190)
- Turn off integrated browser for default
- Weekly updates are too frequent
- [BUG] Max 20x plan: 100% usage after 2 hours of light work (5 commits, no agents)
Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments
github (Sysadmin)
Custom games stuck on "finding server" for all european servers
Feature request: add ACP (Agent Client Protocol) stdio JSON-RPC mode
Forza Horizon 6 (2483190)
Turn off integrated browser for default
Weekly updates are too frequent
[BUG] Max 20x plan: 100% usage after 2 hours of light work (5 commits, no agents)
Add gemini-3.1-pro-preview
[TF2] Feature request: Bring Back Quickplay
RFC: Plan for custom element attributes/properties in React 19
This is meant to address #7249. The doc outlines the pros and cons of various approaches React could use to handle attributes and properties on custom elements. # TOC/Summary - Background - Proposals * Option 1: Only set properties + Pros - Easy to understand/implement - Avoids conflict with future global attributes - Takes advantage of custom element "upgrade" - Custom elements treated like any other React component + Cons - Possibly a breaking change - Need ref to set attribute - Not clear how server-side rendering would work * Option 2: Properties-if-available + Pros - Non-breaking change + Cons - Developers need to understand the heuristic - Falling back to attributes may conflict with future globals * Option 3: Differentiate properties with a sigil + Pros - Non-breaking change that developers can opt-in to - Similar to how other libraries handle attributes/properties - The system is explicit + Cons - It’s new syntax - Not clear how server-side rendering would work * Option 4: Add an attributes object + Pros - The system is explicit - Extending syntax may also solve issues with event handling + Cons - It’s new syntax - It may be a breaking change - It may be a larger change than any of the previous proposals * Option 5: An API for consuming custom elements + Pros - The system is explicit - Non-b
Comments (0)
No comments yet. Start the discussion.