SwiftUI Navigation Link

Hello! I have recently begun using SwiftUI, and I was wondering about how I can change from one screen to another. This is when I learned about Navigation Links. This code I made does not work, and I was wondering what I could do to make it work, and switch views to SelectScreen. (SelectScreen is already a view.)

import SwiftUI

struct Home: View {
    var body: some View {
                NavigationLink{
                    SelectScreen()
                } label: {
                    Image("Play")
                        .resizable()
                        .frame(width: 150.0, height: 150.0)
                }
        }
}

Put the complete NavigationLink inside a NavigationStack like so.


struct ContentView: View {
    var body: some View {
        NavigationStack {
            NavigationLink{
                ToShow()
            } label: {
                Image(systemName: "flame")
                    .resizable()
                    .frame(width: 150.0, height: 150.0)
            }
        }
    }
}
SwiftUI Navigation Link
 
 
Q