Xcode – Better Performance in SwiftUI: Creating a new view OR using a function with @ViewBuilder
When working with different view composition in SwiftUI, we can take two approaches: To use some @ViewBuilder function inside the view as a helper function: @ViewBuilder func makeButtonLabel() -> some View { if isPlaying { PauseIcon() } else { PlayIcon()…