How do I correctly pass a “cell item” to a .sheet from a SwiftUI LazyVGrid?

In such use-case it is more appropriate to use variant of sheet constructed with item, because sheet must be moved out of dynamic content (otherwise you create as many sheets as items in ForEach). Here is possible solution. Tested with Xcode 12 / iOS 14. // helper extension because .sheet(item:…) requires item to be Identifiable … Read more