title: How to navigate to a new view from navigationBar button click in SwiftUI
body: <p>Learning to SwiftUI.  Trying to navigate to a new view from navigation bar buttton clicked.<br>
  The sample code below:</p>
  
  <pre><code>var body: some View {
      NavigationView {
          List(0...&lt; 5) { item in
              NavigationLink(destination: EventDetails()){
                  EventView()
              }
          }
          .navigationBarTitle("Events")
              .navigationBarItems(trailing:
                  NavigationLink(destination: CreateEvent()){
                      Text("Create Event")
                  }
          )
      }
  }
  </code></pre>