title: Swiftui How can I reload a list from a different view
body: <p>I have a very small list that appears on the app . I am trying to reload that same list onTap from a different view even though the data will stay the same . In the View <strong>BView</strong> I have the onTapGesture and when I tap it I would like my breakpoint to hit the List in the <strong>ListView</strong> View . I am wondering if maybe I need an ObservedObject or to put that list somewhere else . I am using SwiftUI 3.0 and any suggestions would be great .</p>
  <pre><code>@main
  struct TestingPurposeApp: App {
      var body: some Scene {
          WindowGroup {
              MasterView()
          }
      }
  }
  </code></pre>
  <p>This is the rest of the code</p>
  <pre><code>import SwiftUI
  import Combine
  
  struct MasterView: View {
      var body: some View {
          VStack {
              BView()
              ListView()
          }
      }
  }
  struct BView: View {
      var body: some View {
          Text(&quot;Trigger ListView OnClick&quot;)
              .onTapGesture {
                ListView() // on tap reload listView
              }
      }
  }
  struct ListView: View {
      @State var users = [&quot;John&quot;,&quot;Peter&quot;,&quot;Jane&quot;]
      var body: some View {
          List(users,id: \.self){user in
              Text(user)
          }
      }
  }
  struct ContentView_Previews: PreviewProvider {
      static var previews: some View {
          ListView()
      }
  }
  </code></pre>