render to string react code example
Example 1: react render string as html
<div dangerouslySetInnerHTML={{__html: 'First · Second'}} />
Example 2: how to use renderto string
ReactDOMServer.renderToString(element)
<div dangerouslySetInnerHTML={{__html: 'First · Second'}} />
ReactDOMServer.renderToString(element)