Post

Replies

Boosts

Views

Activity

Reply to Pre-initialization of views?
No I am currently not using onAppear. Just on viewmodel initialization, I do all the fetching. Below you have two Views. HomeView is the parent view to PageTwo. struct HomeView: View { init() { print("Main View initialized") } var body: some View { NavigationStack { NavigationLink("Open") { PageTwo() } } } } struct PageTwo: View { init() { print("Second View initialized") } var body: some View { Text("") } } When HomeView appears, I get printouts of: Main View initialized Second View initialized Both Views initialized even before I click Open to navigate me to the second view. This is did not happen before. I think around swift 6 update. Is this a bug or a feature? If a feature can it be disabled?
2w