.show(if:)

extension View {
    /// `view.show(if: show)`: optional view
    @ViewBuilder func show(if show: Bool) -> some View {
        if show { self }
    }
}

Last updated