Setup
Install via NPM
npm i tsx-dom
Enable TSX parsing in your tsconfig.json:
{
"compilerOptions": {
"jsx": "react",
"jsxFactory": "h"
// ...
}
// ...
}
Or with the new JSX Transform:
{
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "tsx-dom"
// ...
}
// ...
}