Transform tsx to HTML string
{
"compilerOptions": {
"jsx": "react",
"jsxFactory": "pragma"
}
}
import { pragma } from 'html-tsx'
const renderToString = (name: string) => (
<div class="one two three">
<p id="line">
Hello, {name}!
</p>
</div>
)
console.log(renderToString('world'))
// => <div class="one two three"><p id="line">Hello, world!</p></div>