1.3.0 • Published 4 years ago

viewnode v1.3.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

viewnode

simple view engine, load once, render many times

npm.io

demo

reference

<tag component="component" id?="id">
  if id exists, viewMap[id] will be available
</tag>
type ViewNode {
  node: HTMLElement
  name: string
}

type ViewMap {
  [key: string]: ViewNode
}

fn RenderOnceFunction(
    el: ViewNode,
    context: Object,
    render: RenderFunction,
    viewMap: ViewMap,
) -> UnloadFunction

fn RenderMultipleFunction(
    el: ViewNode,
    context: Object,
    render: RenderFunction,
    viewMap: ViewMap,
) -> ()

type ComponentMap {
  [name: string]: RenderOnceFunction | RenderMultipleFunction
}

fn LoadFunction() -> ()
fn RenderFunction() -> ()
fn UnloadFunction() -> ()

type App {
    load: LoadFunction,
    render: RenderFunction, 
    unload: UnloadFunction,
}

license

ISC

1.3.0

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago