title: SwiftUI - How to change the button's image on click?
body: <p>I'm trying to make it so that when I click a button (that is part of a list of other buttons), the image for the clicked button changes from "star" to "star.fill". Please help!</p>
  
  <pre><code>ForEach(pies, id: \.self) { pie in
        Button(action: {
            // some action
         }) {
         HStack {
             Image(systemName: "star")
             Text(pie)
             Spacer()
         }
  }
  </code></pre>