Releases: interaapps/jdom
Releases · interaapps/jdom
3.1.4
Added typescript types
3.1.3
Added @Attribute & more
3.1.2
Added @Attribute & more
3.1.1
Added @Attribute & more
3.1.0
Typescript Class-Component
import { html, JDOMComponent } from 'jdomjs'
import { CustomElement, State } from "jdomjs/decorator.ts";
@CustomElement('example-component')
class ExampleComponent extends JDOMComponent {
@State()
private name: Hook<String> = 'John'
@Computed(s => [s.name])
private greetings() {
return comp`Hello ${this.name}`
}
render() {
return html`
<input :bind=${this.name}>
<h1>${this.greetings}</h1>
`
}
}
Javascript Class-Component
import { html, JDOMComponent, $r } from 'jdomjs'
class ExampleComponent extends JDOMComponent {
private name = new Hook('John')
private greetings() {
return comp`Hello ${this.name}`
}
render() {
return html`
<input :bind=${this.name}>
<h1>${this.greetings()}</h1>
`
}
}
$r('example-component', ExampleComponent)
3.0.4
Added event . helping operator
3.0.3
Fixed some bugs
3.0.2
Added more Support for more complex HTML like with script tags
3.0.1
Changed version
3.0.0
const count = state(0)
$(document).append(html`
<button @click=${count.value++}>The count is ${count}</button>
`)