It's time for a new article! 😀 This time, I'm sharing some tips and tricks for when using SwiftUI's ViewBuilder to create custom container views. Hope you'll enjoy it, and happy Friday!

https://www.swiftbysundell.com/articles/swiftui-viewbuilder-tips-and-tricks

Tips and tricks for when using SwiftUI’s ViewBuilder | Swift by Sundell

Let’s explore how we can use SwiftUI’s ViewBuilder within our own code, and a few things that can be good to keep in mind when doing so.

Swift by Sundell
@johnsundell here’s @rensbreur explaining why we shouldn’t pass closures to SwiftUI views: https://rensbr.eu/blog/swiftui-escaping-closures/
Don't use escaping closures in SwiftUI - Rens Breur

@piyuv @johnsundell @rensbreur FWIW this essay highlights issues with passing *escaping* closures. Closures that are `ViewBuilder` *without* an explicit `escaping` attached would not see the same issues AFAIK.
@piyuv @johnsundell @rensbreur I also believe the essay even points out at the end that there are some legit use cases where we *need* closures to be `escaping` to capture new state at runtime. The essay is just suggesting not to always use `escaping` by default because it is not an arbitrary distinction.
@johnsundell You couldn’t have timed this article more perfectly for me, as I needed to start fighting with passing additional view content around today. Very helpful!
@johnsundell A great article as usual. Would it be possible to show images of the resultant views as each view progresses?