This is straightforward, copy-pasted code from an app I'm building, where I needed to wrap NSCollectionView for SwiftUI.
It's really bad code, but it works at least.
SwiftNSCollectionView(items: ["a", "b", "a", "b", "a", "b", "a", "b", "a", "b", "a", "b", "a", "c"], itemSize: nil) { item in
Text(item)
}