On the Internet, you can find plenty of SwiftUI tutorials that dive straight into building user interfaces without much consideration for underlying architectural principles.
While these examples can get you started, they often lead to a common pitfall: massive SwiftUI views, i.e., views that are hundreds or even thousands of lines long, brimming with disparate logic.
In this article, I will explain why massive views are a problem and introduce a robust approach to building modular SwiftUI views that are more reusable, easier to understand, and instantly previewable in Xcode.
Matteo has been developing apps for iOS since 2008. He has been teaching iOS development best practices to hundreds of students since 2015 and he is the developer of Vulcan, a macOS app to generate SwiftUI code. Before that he was a freelance iOS developer for small and big clients, including TomTom, Squla, Siilo, and Layar. Matteo got a master’s degree in computer science and computational logic at the University of Turin. In his spare time he dances and teaches tango.



