kabanery-glare
v0.0.4
Published
A web component library based on kabanery
Downloads
4
Readme
kabanery-glare
A web component library based on kabanery
View Specification
View
is a function which takes adata
and return aKNode
View: (data) -> KNode
data
contains three parts,props
,onChange
andchildren
data = {
props,
onChange,
children
}
onChange
is a callback function, which takes two parameters,newProps
andevent
onChange: (newProps, event) -> void
event = {
type,
sourceEvent,
...
}
- When event happened,
onChange
would be called and theprops
of View becamenewProps