title: SwiftUI NavigationLink not pushing view programmatically
body: <p>I am having issues with pushing a view in SwiftUI by using a <code>NavigationLink</code>.</p>
  <p>Currently I have it set up so that a binding boolean is set to &quot;true&quot; depending on whether a login was successful or not. However, when I run the code, the view is not pushed despite the boolean being successfully changed.</p>
  <p>I am using Swift 5 and developing on WatchOS 6.2, which does NOT require the <code>NavigationLink</code> to be nested in a <code>NavigationView</code> since it's not supported.</p>
  <pre><code>import SwiftUI
  
  struct Login: View {
      @State var pushErrorView = false
      @State var pushActivityView = false
  
      var body: some View {
          VStack{
              Button(action:
              {
                  self.login()
              }) {
                  Text(&quot;Log In&quot;)
              }
              
              NavigationLink(destination: PopupMessage(message: &quot;Login Error&quot;), isActive: self.$pushErrorView) {
                  EmptyView()
              }.hidden()
              
              NavigationLink(destination: ActivityView(), isActive: self.$pushActivityView) {
                EmptyView()
              }.hidden()
          }
      }
      
      private func login(){         
          if loginSuccess() {
               self.pushActivityView = true                    
          }
          else {
               self.pushErrorView = true
          }
      }
  }
  </code></pre>