Type Safely

Type Safely

Making Subviews Private So They Cannot Be Used Elsewhere

Daily Coding Tip 088

Millie Sturgeon's avatar
Millie Sturgeon
May 25, 2022
∙ Paid
Image by Harry Burgess from Pixabay

dislike the idea of using computed properties marked as @ViewBuilder to store subviews. This inevitably leads to a more bloated view, as all the @State and @Binding properties that the computed property requires will need to be contained in the parent view.

Apple designed SwiftUI around structures for a reason. A struc…

User's avatar

Continue reading this post for free, courtesy of Type Safely.

Or purchase a paid subscription.
© 2026 Type Safely · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture