Skip to content

Instantly share code, notes, and snippets.

@alexzuza
Last active April 1, 2018 14:46
Show Gist options
  • Save alexzuza/0e1e7dc006ecd06640e76491699f6c08 to your computer and use it in GitHub Desktop.
Save alexzuza/0e1e7dc006ecd06640e76491699f6c08 to your computer and use it in GitHub Desktop.
IDOM match
const matches = function(matchNode, name/*, key */) {
const data = getData(matchNode);
return name === data.name // && key === data.key;
};
function renderDOM(name) {
if (currentNode && matches(currentNode, name/*, key */)) {
return currentNode;
}
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment