Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save szaranger/2be8998e7582a1cd3046d5a55acaf45c to your computer and use it in GitHub Desktop.
Save szaranger/2be8998e7582a1cd3046d5a55acaf45c to your computer and use it in GitHub Desktop.
import React from 'react';
import { renderToString } from 'react-dom/server';
function App() {
const html = renderToString(<>Hey there!</>);
return <div dangerouslySetInnerHTML={{__html: html}}></div>;
};
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment