SwiftUI tip: if you use something like "indices" in a ForEach, the view for each item will be identified by the item's index, which is probably not what you want and may cause weirdness in insertion/removal transitions. If you need to use indices in a ForEach, explicitly define the item view's identifier with the "id" modifier. Even then, it may not work in some containers, so use enumerated() or make the index a part of the model itself.