12 min read
WidgetKit architecture for real apps: timelines, snapshots, and app-state boundaries
A practical architecture for WidgetKit timelines, snapshots, caching, and refresh behavior that stays aligned with the app without leaking UI state into the widget.
Read the essayEnteror double click opens it
Topics
In this essay
- 1. Treat the widget as a projection, not a second app
- 2. Store widget data deliberately
- 3. Build snapshots from domain events, not from random call sites
- 4. Understand what timelines are for
- 5. Use reloads as signals, not commands
- 6. Keep the widget view dumb
- 7. Separate placeholders, snapshots, and timelines
- 8. Make configuration part of the contract
- 9. Budget the widget's content, not just its code
- 10. Be careful with interactive widgets
- 11. Test widgets like separate clients
- 12. The baseline I would ship