Avoiding having to recompute values within SwiftUI views

SwiftUI is a fantastic framework, with its declarative approach removing a lot of the complexity that comes with orchestrating UI updates. However, this benefit also comes with the cost, as developers can't have complete control over when and how the code in a View body property will be executed. Here, John Sundell explains an issue this can cause, and provides some approaches he uses to mitigate it.

Simpler way to deal with hardcoded ViewModifer values in SwiftUI

When working with SwiftUI, it's likely that at some point we will want to configure a property of our UI based on a conditional value. For example, setting a font color to red when an error occurs. However, as Daniel Tavares explains in this post, this can become cumbersome when we have a lot of UI properties that depend on conditional values. Luckily, Daniel has something which can help, and he shares it with us in this post.