DOM elements

Custom elements

A hyphenated tag identifies a custom element. The host must register the element; test property and event integration against the chosen React version rather than assuming ordinary DOM behavior.

Formal Syntax & Structure

react syntaxreact
<stock-badge ... />

Working Example

Example Snippetreact
export default function App(){return <stock-badge data-stock='4'>4 items</stock-badge>}
React Reference