Convert react JSX object to HTML

Use the renderToStaticMarkup method. As per the documentation:

You can use this method to generate HTML on the server and send the markup down on the initial request for faster page loads and to allow search engines to crawl your pages for SEO purposes.

const htmlString = ReactDOMServer.renderToStaticMarkup(
    <div>
        ...
    </div>
);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)