riot v4.1.1 Release Notes

Release Date: 2019-06-10 // over 2 years ago
    • ➕ 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): voidclearMessage(): 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