Daily iOS
iOS system design

Shared features across teams

Several screens in the app (home, profile, settings) need the same "notification center" feature: an unread badge, a list, and mark as read. How would you design it so you don't rebuild it per screen, and marking as read on any screen updates the badge on all the others?

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

Keep notification state in one NotificationStore (single source of truth) and have each screen only subscribe. Split the UI into reusable components (badge view, list view) and ship them as a separate module.

Share a question