News for hackers. Stuff that matters.
Re:Marko vs. React: Performance Benchmark by myhf on Tuesday February 17, 2015 @07:24PM (#9066196)
It re-creates items even when they have unique identifiers? Is that a bug?
Re:Marko vs. React: Performance Benchmark by funkiee on Tuesday February 17, 2015 @07:36PM (#9066255)
It's as intended. If the ID in a list of 100 changes, and that ID is the key, React is going to assume the tree is different during reconciliation. If you were to use an index, like 0, on pagination the key is still 0 and as such the DOM nodes will be reused. http://facebook.github.io/react/docs/reconciliation.html See #2 in the Trade-offs section.