react
react copied to clipboard
Consider Special Casing Certain DOM Attributes to Accept Elements
The use case is for example, translation components rendering string content.
The HTML spec has some unfortunate attributes that behave kind of like content. It seems like they should be able to accept React elements. If I were to design a similar React component I would allow it to accept React elements.
Since we normalize usage we could in theory have it built-in to React that certain attributes like placeholder
, aria-label
, etc. could accept React components that render into strings.
That would probably have to go in after we figure out a way to render strings at the root of a React composite component.
hey can i work on this issue ?