jsx-flow is a simple JSX templating language.
npm i jsx-flow
Using jsx-flow 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>
)