Echo JS 0.11.0

<~>
tracker1 927 days ago. link 2 points
For reference, the key doesn't need to be uuid/distinct globally... it *can* be, but whatever the natural key is for your iteration is generally fine.  Even if it's the text value itself, depending on the storage/persistence.

The reason for the key, is to minimize the DOM impact on large collections to only those nodes that have changed within whatever iterable/collection/array is used to populate the values.  Without such a key, a large (many hundreds to thousands) of DOM nodes/elements within that collection could be completely recomposed, which can be visually noticeable to jarring/jittery in terms of usage.

Replies