Transform tsx to AMP HTML string
npm install amphtml-tsxTransform tsx to AMP HTML string
``json`
{
"compilerOptions": {
"jsx": "react",
"jsxFactory": "pragma"
}
}
`tsx
import { pragma } from 'amphtml-tsx'
const renderToString = (name: string) => (
Hello, {name}!
console.log(renderToString('world'))
// =>
Hello, world!