Daily iOS
iOS system design

Cross-screen state consistency

When the user double-taps to like a post in the Instagram detail screen, the same post in the feed, on the profile, and in search results all have to update immediately. Walk me through how that event flows through the architecture layers.

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

One PostStore owns post state and every screen subscribes by id. Double-tap → view → presenter/view model → PostRepository.like(id) → store update plus outbox send → settled with the server value on success. Races are handled with a per-request version token so only the result of "my last request" is applied.

Share a question