Skip to content

Instantly share code, notes, and snippets.

@yelouafi
Last active August 29, 2015 14:25
Show Gist options
  • Save yelouafi/5d5d24715d76bced336f to your computer and use it in GitHub Desktop.
Save yelouafi/5d5d24715d76bced336f to your computer and use it in GitHub Desktop.
import snabbdom from 'snabbdom';
const patch = snabbdom.init([ // Init patch function with choosen modules
require('snabbdom/modules/class'), // makes it easy to toggle classes
require('snabbdom/modules/props'), // for setting properties on DOM elements
require('snabbdom/modules/style'), // handles styling on elements with support for animations
require('snabbdom/modules/eventlisteners'), // attaches event listeners
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment