Type-safe templating for the browser.
npm install --save-dev j-templates
Framework for building reactive browser applications:
- TypeScript only - no extra transpile or compile steps
- Bundler agnostic - bundle using your preferred library
- Low dependencies - hello world only requires this + a bundler to get started
import { Component } from 'j-templates';
import { div } from 'j-templates/DOM';
class HelloWorld extends Component {
public Template() {
return div({}, () => "Hello world");
}
}
var helloWorld = Component.ToFunction("hello-world", HelloWorld);
Component.Attach(document.body, helloWorld({}));
<hello-world>
<div>Hello world</div>
</hello-world>