@chronocide/spark is a simple JSX templating language.
npm i @chronocide/spark
Using @chronocide/spark should feel familiar for those used to writing JSX:
tsconfig.json
{
...
"jsx": "react",
"jsxFactory": "spark.createElement",
"jsxFragmentFactory": "spark.Fragment"
...
}
index.tsx
const Template = props => (
<html lang="en">
<body>{props.children}</body>
</html>
);
const Page = () => (
<Template>
<h1>Title</h1>
</Template>
)