you could use this one-liner:
editMode = editMode == .active ? .inactive : .active
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: