Releases: riot/riot
Releases · riot/riot
v4.3.2
v4.3.1
v4.3.0
v4.2.0
- Fix: attributes removal for numerical values #2711
- Add: the
<template>
tag to support html fragment rendering foreach
andif
directives #2692
<!-- each + template -->
<dl>
<template each={ item in items }>
<dt>{ item.title }</dt>
<dd>{ item.description }</dd>
</template>
</dl>
<!-- if + template -->
<div>
<template if={ meta }>
<h1>{ meta.title }</h1>
<h2>{ meta.subtitle }</h2>
</template>
</div>
- Add: typescript generics support for component definitions #2709
- Add: improve rendering performance of custom looped components
v4.1.1
- Add: the RiotComponentExport interface to simplify the components creation in typescript, for example:
import Child from './child.riot'
import {RiotComponentExport} from 'riot'
interface MyComponentInterface extends RiotComponentExport {
onClick(event: MouseEvent): void
clearMessage(): void
state: {
message: string
}
}
function MyComponent(): MyComponentInterface {
return {
state: {
message: 'hello'
},
onClick(event) {
this.update({
message: 'goodbye'
})
},
clearMessage() {
this.update({
message: ''
})
}
}
}
MyComponent.components = {
Child
}
export default MyComponent
v4.1.0
- Add [type definitions] for typescript users (https://github.com/riot/riot/blob/master/riot.d.ts) #2707
- Check a simple Typescript Example Project
v4.0.8
v4.0.7
v4.0.6
- Fix make sure that the
value
attributes get passed down to the children tags