Type Safely

Type Safely

Share this post

Type Safely
Type Safely
Making Subviews Private So They Cannot Be Used Elsewhere

Making Subviews Private So They Cannot Be Used Elsewhere

Daily Coding Tip 088

Millie Sturgeon's avatar
Millie Sturgeon
May 25, 2022
∙ Paid

Share this post

Type Safely
Type Safely
Making Subviews Private So They Cannot Be Used Elsewhere
Share
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…

Keep reading with a 7-day free trial

Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Type Safely
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share