Very simple and tiny jsx to string converter
npm install jsx-to-str
"jsx": "react",
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment",
If you cannot or don't want to set jsxFactory
in tsconfig.json
, in every jsx file add directives:
/** @jsx h */
/** @jsxFrag Fragment */
In every jsx file import jsx-to-str
import { h, Fragment } from "jsx-to-str";