Last active
July 8, 2019 07:52
-
-
Save daybrush/ca59547608d4e57ee84c719791ff0f36 to your computer and use it in GitHub Desktop.
ListDiffer, ChildrenDiffer
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
import ListDiffer from "@egjs/list-differ"; | |
import ChildrenDiffer from "@egjs/children-differ"; | |
// Indicates the callback function that finds the key for that data. | |
// And only numbers or strings are allowed. | |
const listDiffer = new ListDiffer([], v => v); | |
const childrenDiffer = new childrenDiffer(document.body.children); | |
document.body.appendChild(document.createElement("div")); | |
const result = childrenDiffer.update(document.body.children); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment