Daily iOS
UIKit

Compositional Layout and Diffable Data Source

You're moving a screen built with UICollectionViewFlowLayout and an index-based dataSource to UICollectionViewCompositionalLayout and UICollectionViewDiffableDataSource. What gets better?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Compositional Layout lets you declare a different layout per section, and Diffable Data Source compares snapshots to animate inserts and deletes automatically, which removes the index mismatch crashes.

Share a question