title: how to return a value from completion handler
body: <p>I want to put the value I get from the completion handler into Text view as a string, but I get an error. Here is what I try to do:</p>
  <pre><code>    func final(name: String, completion: @escaping (_ message: String)-&gt; Void){
          guard let uid = AuthViewModel.shared.userSession?.uid else {return}
          Firestore.firestore().collection(&quot;users&quot;).document(uid).collection(&quot;chats&quot;).document(name).collection(&quot;messages&quot;).whereField(&quot;read&quot;, isEqualTo: false).getDocuments { (snapshot, _) in
              guard let documents = snapshot?.documents.compactMap({ $0.documentID }) else {return}
              
              let unread = documents.count
              let unreadString = String(unread)
              completion(unreadString)
          }
      }
  </code></pre>
  <p>Try to put it in a text like so:</p>
  <pre><code>Text(model.final(name: name, completion: { (message) in
   String(message)
   }))
  </code></pre>
  <p>Here is the error I get</p>
  <pre><code>Type '()' cannot conform to 'StringProtocol'; only struct/enum/class types can conform to protocols
  </code></pre>