use react dom server code example
Example 1: import react dom
import ReactDOM from 'react-dom';
Example 2: how to use renderto string
ReactDOMServer.renderToString(element)
import ReactDOM from 'react-dom';
ReactDOMServer.renderToString(element)