May 3, 2021
In order to make a NavigationLink it needs a destination parameter, in your case view B. An instance of that view (struct) will be created and passed to NavigationLink each and every time the body of view A is evaluated. (Which can happen a lot.)
This is normal, and how SwiftUI works.
As such, note that you shouldn't be doing any heavy lifting on intialization of view B.
Wrote this one just for you:
https://michaellong.medium.com/swiftui-navigationlink-does-what-67947249bd8c