const previousKeyIndexMap = new Map(previousKeyIndexPairs)
const operations: (() => void)[] = []
+ let mountCounter = 0
const relocateOrMountBlock = (
blockIndex: number,
blockItem: ReturnType<typeof getItem>,
)
}
} else {
+ mountCounter++
operations.push(() =>
mount(
source,
relocateOrMountBlock(i, blockItem, blockKey, -1)
}
- const useFastRemove = operations.length === newLength
+ const useFastRemove = mountCounter === newLength
for (const leftoverIndex of previousKeyIndexMap.values()) {
unmount(