SwiftLee Aug 31, 2026

MVVM in SwiftUI: Using view models without overengineering

Article Summary

Antoine van der Lee tackles the most common SwiftUI mistake: slapping a view model on everything. His approach? Start simple, add MVVM only when it actually solves a problem.

This practical guide from SwiftLee shows how to use MVVM in SwiftUI without falling into the overengineering trap. Van der Lee walks through when view models add value versus when they just create unnecessary abstraction, using a real contact deletion workflow as an example.

Key Takeaways

Critical Insight

MVVM in SwiftUI works best when you start without it and add view models only when they improve testability, readability, or state management.

The article includes a complete testing example showing how to verify deletion workflows without rendering any SwiftUI views.

About This Article

Problem

SwiftUI developers often can't tell when MVVM actually helps versus when it just adds complexity. The result is bloated codebases where view model layers mostly duplicate what's already in the model.

Solution

Antoine van der Lee suggests a practical test: only add a view model if your view needs to handle async work, transform data, validate input, contain logic worth testing, or talk to multiple services. Use @Observable and @MainActor for the implementation.

Impact

This cuts down on unnecessary abstraction while keeping tests intact. Simple views stay simple. Complex screens get the separation they need without making the code harder to navigate or read.