Making an HTML string from a React component in background, how to use the string by dangerouslySetInnerHTML in another React component

This seems to work just fine if you want to render any component to a HTML string:

import { renderToStaticMarkup } from 'react-dom/server'

function componentToString() {
  return renderToStaticMarkup(<MyAwesomeComponent some="props" or="whatever" />)
}

Leave a Comment

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