Skip to content

Instantly share code, notes, and snippets.

@yelouafi
Last active August 29, 2015 14:25
Show Gist options
  • Select an option

  • Save yelouafi/0e4f936bbc97c4489864 to your computer and use it in GitHub Desktop.

Select an option

Save yelouafi/0e4f936bbc97c4489864 to your computer and use it in GitHub Desktop.
function main(initState, element, {view, update}) {
const newVnode = view(initState, event => {
const newState = update(initState, event);
main(newState, newVnode, {view, update});
});
patch(oldVnode, newVnode);
}
@paldepind
Copy link

You don't use the element parameter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment