Created
November 7, 2021 22:42
-
-
Save szaranger/2be8998e7582a1cd3046d5a55acaf45c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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