README and documentationIGListKit version:the result log:

In this demo every time I click on the button cell instance, it toggles between the two Shared instances
Before a cell is removed from superview, it's not added into the reuse queue, so when you dequeue for the new cell, it'll create a new instance for you. After the update, the first one is added into the reuse queue. So the next time when you call dequeue, you'll get the first instance.
It's expected behavior of UICollectionView, so it's neither IGListKit or UICollectionView's bug.
@allenhsu UITableView的行为会和UICollectionView一样吗,我自己按正常步骤写UICollectionView时未出现两个实例切换的情况,这个和cell的注册时机有关吗
@allenhsu
Yup sounds like this is just the expected behavior
Sent with GitHawk
@feixue299 nope, it's not related to registration of cells, it depends on how you reload data, with or without animation.
In your demo project, you're calling reloadData of UITableView and your own UICollectionView, while calling performUpdates(animated: true, completion: nil) of ListAdapter, they're totally different.
So during animation, all existing cells are ON SCREEN, and new cells are ADDED TO SCREEN at the same time, so there need to be 2 instances for the animation to complete.
However, if you call reloadData, all cells are REMOVED FROM SCREEN and ADDED TO REUSE QUEUE, so when you dequeue a cell, an existing instance will be reused. Different from the animated update, there won't be 2 cells on screen at the same time.
You can also try performBatchUpdates of UICollectionView and beginUpdates/endUpdates of UITableView. They're more similar to IGListKit's performUpdates, but you need to deal with diff logic in the block by yourself.
@allenhsu thanks. I rarely use animation updates to understand the differences.