4 ms·
If you like JSX as a templating language and you want to generate simple html strings then just use vhtml with TypeScript [1][2]. You have to import the h funct
by throwitaway1123 2y ago
If you like JSX as a templating language and you want to generate simple html strings then just use vhtml with TypeScript [1][2]. You have to import the h function from vhtml in your tsx files, and then update your tsconfig file so that TypeScript knows what to transform the JSX into:
"jsx": "react",
"jsxFactory": "h",
"jsxFragmentFactory": "null",
If you want something a little more powerful then hono/jsx is a decent choice [3].
[1] https://github.com/developit/vhtml https://github.com/developit/vhtml
[2] https://github.com/developit/vhtml/issues/31 https://github.com/developit/vhtml/issues/31
[3] https://hono.dev/docs/guides/jsx https://hono.dev/docs/guides/jsx