I've got a SwiftUI application on MacOS with a view that is a List. When the user selects an element in the list, I want the contents of another view to change based on what's selected in the List. (Like in the Mac version of the Landmarks app in the SwiftUI On All Devices talk at WWDC.)
Some List initializers have a selection: parameter, but I can't find any documentation on how it works. I've been through all of the SwiftUI tutorials, but they're all for iOS, and don't seem to address this topic = they use NavigationView and NavigationLink, which don't seem applicable on MacOS.
Can someone point me at some documentation for how the selection: parameter to List initializers is supposed to work? Can anyone tell me where to find the source for the Landmarks app used in the SwiftUI On All Devices talk? (Or really, anything else I can look at to figure out how to make this work?)