Last active
April 1, 2018 14:46
-
-
Save alexzuza/0e1e7dc006ecd06640e76491699f6c08 to your computer and use it in GitHub Desktop.
IDOM match
This file contains hidden or 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
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