keet
keet
Example
import Keet from 'keet'
class App extends Keet {
contructor() {
super()
// props
}
// new extended method
myMethod(...args){
//
}
}
const app = new App()
new Keet(localize)
Param | Type | Description |
---|---|---|
localize | Boolean | Use local inhertance for sub-components instead using global referance |
keet.mount(instance)
Mount an instance of html/string template
Kind: instance method of Keet
Param | Type | Description |
---|---|---|
instance | Object string | the html/string template |
keet.cycleVirtualDomTree(stub)
Parse this component to the DOM
Kind: instance method of Keet
Param | Type | Description |
---|---|---|
stub | Boolean | set as true if this a child component |
keet.callBatchPoolUpdate()
Recheck all states if anything changed, diffing will occurs. this method is asynchronous and trottled, you can call it from a loop and only trigger diffing when the loop end
Kind: instance method of Keet
keet.subscribe(fn)
Another component can subscribe to changes on this component. This is the subscribe method
Kind: instance method of Keet
Param | Type | Description |
---|---|---|
fn | function | the callback function for the subscribe |
keet.inform(...value)
Another component can subscribe to changes on this component. This is the publish method
Kind: instance method of Keet
Param | Type | Description |
---|---|---|
...value | * | one or more parameters to publish to subscribers |
keet.storeRef(name)
Store referance in the global space, with this the parent component do need to store/assign it as a property while still be able to look for the sub-component to initialize it
Kind: instance method of Keet
Param | Type | Description |
---|---|---|
name | string | Identifier for the component, should be unique to avoid conflict |