Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Loop item identity vs. compare by reference #2418
If I gather correctly, this is the line where 'comparison by reference' happens:
I'm seeing lists being fully recreated whenever I cannot ensure these references are maintained, even if the underlying data has not changed. My state library (Baobab) does not preserve references by default, when an array changes. This causes unnecessary redrawing, which is slow and ugly.
In 99% of these cases, a unique identifier is already present and I would like to take advantage of this, similar to VueJS's 'key' attribute: https://vuejs.org/v2/guide/list.html#key
Is this something to consider as a new Riot attribute, or to make configurable using a callback function perhaps? The