Created
February 28, 2014 08:13
-
-
Save Raynos/9267250 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main(initialState, render) { | |
... | |
return { | |
update: function (currentState) {}, | |
elem: ... | |
} | |
} | |
var state = ObservHash({ | |
... | |
}) | |
function render(state) { | |
return h("div", [ ... ]) | |
} | |
var loop = main(state(), render) | |
state(loop.update) | |
document.body.appendChild(loop.elem) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment