slimapp
Simplest MVVM
Background
A practice of hyperapp
Usage
Checkout the examples
Slimapp provides two functions: h
and app
.
h
h
helps you to build your vdom
var vdom =// vdom: {// tagName: 'span',// key: undefined,// props: {class: 'test'},// children: ['text']// }
app
app
helps you to start your app
var {return}var actions ={ statea += data }{ statea -= data }var state =a: 1var vm =console // '<p>1</p>'vm // '<p>2</p>'vm // '<p>-1</p>'