I am curious as to why you did a LazyVGrid within a LazyVStack?
I just did a LazyVGrid at the top with ForEach for Genre and within that a ForEach for the Subgenre . It seems to have the same functionality but maybe I am missing something.
1 Like
I’m curious as well! But it’s been quite a while since I made this and I unfortunately don’t remember.
Here’s the better solution:
LazyVGrid(
columns: [.init(.adaptive(minimum: 150))],
pinnedViews: .sectionHeaders
) {
ForEach(Genre.list) { genre in
Section(header: genre.header.id(genre)) {
ForEach(genre.subgenres, content: \.view)
}
}
}
.padding(.horizontal)
1 Like
That is pretty much what I did. I was worried there was some hidden reason that might bite me later 
SwiftUI makes me nervous in the same way Kotlin for Android does – makes lots of things easier but there is a lot of “magic” behind the scenes that you have little control over 
But I am forging ahead to learn enough to convert my existing UIKit apps…
1 Like