Use of unresolved identifier ‘NavigationButton’

struct LandmarkList : View {

    var body: some View {

        NavigationView {

            List(landmarkData) { landmark in

                NavigationButton(destination: LandMarkDetail(landmark: landmark)) {

                    LandmarkRow(landmark: landmark)

                 }

                }

                .navigationBarTitle(Text(“Landmarks”), displayMode: .inline)

        }

      

    }

}

NavigationButton 已经背替换  NavigationLink

NavigationButton changed to NavigationLink for a while now. So replace it and use it.

from: https://stackoverflow.com/questions/57615514/unresolved-identifier-navigationbutton-error