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.