Note the issue is that the "Main View" & "Second View" are printed right after each other, before clicking the Open navigation link. When I click Open, "Second View" would not re-print.
struct HomeView: View
{
init()
{
print("Main View")
}
var body: some View
{
NavigationStack
{
NavigationLink("Open")
{
PageTwo()
}
}
}
}
struct PageTwo: View
{
init()
{
print("Second View")
}
var body: some View
{
Text("")
}
}