title: I want to create a view where the hashtag is displayed in SwiftUI
body: <p>Currently, I am studying SwiftUI and making UI that is displayed in the view when registering hashtags.
  But I don't know what to do with the logic of creating and inserting a new HStack when it's out of screen size inside the VStack.
  I've searched several times, but I couldn't find any helpful words or keywords.</p>
  <p>I would appreciate it if you could help me by knowing the answer.</p>
  <p><a href="https://i.stack.imgur.com/BbpzM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BbpzM.jpg" alt="enter image description here" /></a></p>
  <p>The image above is an example.
  I want to create a new HStack and put it in the VStack when the width exceeds the horizontal size of the device while inserting a text item into the HStack.</p>
  <pre><code>struct HashTagView: View {
      var hashTagArray: [String] = [&quot;#Lorem&quot;, &quot;#Ipsum&quot;, &quot;#dolor&quot;, &quot;#sit&quot;, &quot;#amet&quot;, &quot;#consectetur&quot;, &quot;#adipiscing&quot;, &quot;#elit&quot;, &quot;#Nam&quot;, &quot;#semper&quot;, &quot;#sit&quot;, &quot;#amet&quot;, &quot;#ut&quot;, &quot;#eleifend&quot;, &quot;#Cras&quot;]
      
      var body: some View {
          VStack(spacing: 5)  {
              ForEach(hashTagArray, id:\.self) { tag in
                  Text(tag)
              }
          }
          .padding()
          .border(Color.blue)
          .frame(width: UIScreen.main.bounds.size.width)
      }
  }
  </code></pre>
  <p>this is my code.</p>