title: SwiftUI: Pass string to view on button press
body: <p>I want to pass a string on a button press in SwiftUI from ContentView to SoundPageView.
  Each different button should pass a different string. It is an English language learning app so I want to pass a grammar category.</p>
  
  <p>For example.</p>
  
  <pre><code>                NavigationLink(destination: SoundPageView()) {
                      Text("Should")
                  }
                  .buttonStyle(GrammarButton())
                  NavigationLink(destination: SoundPageView()) {
                      Text("Articles)
                  }
                  .buttonStyle(GrammarButton())
                  NavigationLink(destination: SoundPageView()) {
                      Text("First Conditional")
                  }
                  .buttonStyle(GrammarButton())
  </code></pre>
  
  <p>My SoundPageView is a view that has a lot of buttons that play sounds.</p>
  
  <pre><code>struct SoundPageView: View {
  
      var body: some View {
          NavigationView {
                  HStack(spacing:0) {
                      VStack {
                          Button(action: {
                              playSound(sound: "art_audio1", type: "mp3")
                          }) {
                              Text("Button 1")
                          }
  </code></pre>
  
  <p>I want to pass a category string like "should" "art" or "first" to SoundPageView so that different sounds are loaded for the buttons.</p>
  
  <p>I also want to use the category string to alter the audio filenames but I'm not sure how to do that. Something like...</p>
  
  <p>playSound(sound: \category + "_audio1", type: "mp3")</p>
  
  <p>I am new to SwiftUI and a beginner coder. Thanks in advance.</p>