How to Conditionally Apply View Modifiers in SwiftUI

In this post Frank Jia implements an extension on the SwiftUI View type that allows us to conditionally apply a view modifier. Frank's usage of the ViewBuilder attribute results in a concise, elegant implementation.