title: SwiftUI Change View with Button
body: <p>I understand there is <code>PresentationButton</code> and <code>NavigationButton</code> in order to change views in the latest <code>SwiftUI</code>. However I want to do a simple operation like below. When user clicks on SignIn button if credentials are correct it will sign them in but also do a segue (in this case change the view). However I could not check if they are correct in <code>PresentationButton</code> and I could not change the view in a normal button.</p>
  <p>Is there another way to do that?</p>
  <pre><code>  @IBAction func signInClicked(_ sender: Any) {
          
          if emailText.text != &quot;&quot; &amp;&amp; passwordText.text != &quot;&quot; {
              
              Auth.auth().signIn(withEmail: emailText.text!, password: passwordText.text!) { (userdata, error) in
                  if error != nil {
                     //error
                  } else {
                     performSegue(withIdentifier: &quot;toFeedActivity&quot;, sender: nil)
                  }
              }
          } else {
              //error
          }
      }
  </code></pre>