One reason where you might prefer the if-else version is if you wanted a transition between the two states.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: