title: How do I go to another view in swiftUI programmatically using Button (action:{}) {}, and NOT any NavigationLink or whatever?
body: <p>I am trying to programmatically change views in my macOS application. I 
  found stuff like NavigationLink and others but I am not allowed to use them. The code to switch must be in Button's action, because this way I know that I can quickly switch from the code, even if it is not in button format. How can I do this?</p>
  
  <p>Button in ContentView.swift:</p>
  
  <pre><code>Button(action: {
      //What goes here. Tried Settings(), didn't work          
  }) {
      Text("Settings")
  }.buttonStyle(PlainButtonStyle())
  </code></pre>
  
  <p>Settings.swift:</p>
  
  <pre><code>import SwiftUI
  
  struct Settings: View {
      var body: some View {
          Text("Hello, world!")
      }
  }
  </code></pre>
  
  <p>No NavigationLink, No NavigationView or whatever. I am looking for a way to do this purely within the action of the button.</p>
  
  <p>I have another question about this topic so if you know swiftui click <a href="https://stackoverflow.com/questions/59340990/why-is-switching-views-in-the-following-manner-so-laggy-click-here-if-you-know">here</a> and it is critical to me to have it answered. If you answered this question maybe you can answer the other one, and if that question gets an acceptable answer, then that'll be lit.</p>