title: Show result of an asynchronous call in a SwiftUI view
body: <p>How can I show the result of something that comes out of an asynchronous call in a SwiftUI view. In the following code, I would like to have a Text that shows the success result of the call to addressFor(location).</p>
  <pre><code>
  import SwiftUI
  import CoreLocation
  
  struct ContentView: View {
      
      var location: CLLocation
      
      var body: some View {
          Text(&quot;Hello, World!&quot;)
          // How can I have a Text here that shows the success result of the completion coming from addressFor(location)
      }
      
      private func addressFor(_ location: CLLocation, completion: @escaping (Result&lt;String, Error&gt;) -&gt; Void) {
          let geocoder: CLGeocoder = CLGeocoder()
          geocoder.reverseGeocodeLocation(location) { (placeMark, error) in
              if error == nil {
                  if let firstPlaceMark = placeMark?.first {
                      completion(.success(firstPlaceMark.name ?? &quot;&quot; + &quot; - &quot; + (firstPlaceMark.locality ?? &quot;&quot;)))
                  }
              } else {
                  completion(.failure(error!))
              }
          }
      }
  }
  
  struct ContentView_Previews: PreviewProvider {
      static var previews: some View {
          ContentView(location: CLLocation(latitude: 39.8333333, longitude: -98.585522))
      }
  }
  
  </code></pre>