0.0.4 • Published 7 years ago
kabanery-glare v0.0.4
kabanery-glare
A web component library based on kabanery
View Specification
Viewis a function which takes adataand return aKNode
View: (data) -> KNodedatacontains three parts,props,onChangeandchildren
data = {
props,
onChange,
children
}onChangeis a callback function, which takes two parameters,newPropsandevent
onChange: (newProps, event) -> void
event = {
type,
sourceEvent,
...
}- When event happened,
onChangewould be called and thepropsof View becamenewProps