As I was following lesson 9 module 5 from the iOS foundation (swiftUI) syllabus (the learning App), I noticed a strange behaviour with NavigationLink. I initially thought I had made a mistake on my side so I eventually built Chris’s code directly but got the same behaviour (different from the video).
The odd behaviour is as follows: in the home view of the app, when I click on the first module ‘Learn Swift’, we navigate to the list of lessons but then immediately go back to the home view. This behaves as if the binding variable passed in the ‘selection’ argument was set to nil just after entering the ContentView.
As anyone else experienced this? Could it be due to a Swift update since it behaves differently from the video?
Edit: still unsure what the original issue is but it seems to be fixed by using the version post lesson 14 of the app.