Creates element renderer that produces React DOM elements:
null
Attributes handling:
class
className
style
Optional
A mapping from an element tag name to a component.
function Tooltip(props) { return <div title={props.title}>{props.children}</div>;}const myRenderer = createReactDOMElementRenderer({ p: 'div', Tooltip,});<MessageRendererProvider value={myRenderer}> {...}</MessageRendererProvider> Copy
function Tooltip(props) { return <div title={props.title}>{props.children}</div>;}const myRenderer = createReactDOMElementRenderer({ p: 'div', Tooltip,});<MessageRendererProvider value={myRenderer}> {...}</MessageRendererProvider>
Creates element renderer that produces React DOM elements:
nullis returned.Attributes handling:
classattribute is transformed into aclassNameproperty.styleattribute is parsed as a CSS text and transformed into astyleproperty.