Keet.js v4.2.1

Keet.js v4.2.1

  • Docs
  • API
  • Help

›V4 API

V4 API

  • keet
  • CreateModel

keet

keet

Example

import Keet from 'keet'

class App extends Keet {
  contructor() {
    super()
    // props
  }
  // new extended method
  myMethod(...args){
    //
  }
}

const app = new App()
  • keet
    • ~Keet
      • new Keet(localize)
      • .mount(instance)
      • .cycleVirtualDomTree(stub)
      • .callBatchPoolUpdate()
      • .subscribe(fn)
      • .inform(...value)
      • .storeRef(name)

new Keet(localize)

ParamTypeDescription
localizeBooleanUse local inhertance for sub-components instead using global referance

keet.mount(instance)

Mount an instance of html/string template

Kind: instance method of Keet

ParamTypeDescription
instanceObject stringthe html/string template

keet.cycleVirtualDomTree(stub)

Parse this component to the DOM

Kind: instance method of Keet

ParamTypeDescription
stubBooleanset 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

ParamTypeDescription
fnfunctionthe 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

ParamTypeDescription
...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

ParamTypeDescription
namestringIdentifier for the component, should be unique to avoid conflict
Next →
  • keet
Keet.js v4.2.1
Extra
TodoMVCPerformance Benchmark
Community
Gitter Chat
on Github
Star  Fork  Issue

Generated with Docusaurus

Docusaurus
Copyright © 2018 Shahrul Nizam Selamat