title: Shortening swiftUI code: compiler is unable to type-check this expression in reasonable time
body: <p>I am trying to create a UI in SwiftUI with two sets of ten buttons (Imaging a game of Cup Pong). Whenever I try to build or preview the code I get the following error message: 'The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions'. I was wondering how I could fix this. </p>
  
  <p>I know that it is very long. Is there any way to fix it so that the code would work. </p>
  
  <pre><code>//  ContentView.swift
  //  Text Pong
  //
  //  Created by Thomas Braun on 8/21/19.
  //  Copyright © 2019 Thomas Braun. All rights reserved.
  //
  
  import SwiftUI
  
  struct ContentView: View {
      var body: some View {
          VStack(spacing: 250.0) {//Contains both the triangles
              VStack {//User Triangle
                  HStack(spacing: 15.0) {
                  Button(action: {}) {
                          Text("7")
                              .font(.largeTitle)
                      }
                  Button(action: {}) {
                          Text("8")
                              .font(.largeTitle)
                      }
                  Button(action: {}) {
                          Text("9")
                              .font(.largeTitle)
                      }
                  Button(action: {}) {
                          Text("10")
                              .font(.largeTitle)
                      }
                  }
                  HStack(spacing: 15.0) {
                  Button(action: {}) {
                          Text("6")
                              .font(.largeTitle)
                      }
                  Button(action: {}) {
                          Text("5")
                              .font(.largeTitle)
                      }
                  Button(action: {}) {
                          Text("4")
                              .font(.largeTitle)
                      }
                  }
                  HStack(spacing: 15.0) {
                  Button(action: {}) {
                          Text("3")
                              .font(.largeTitle)
                      }
                  Button(action: {}) {
                          Text("2")
                              .font(.largeTitle)
                      }
                  }
                  HStack(spacing: 15.0) {
                  Button(action: {}) {
                          Text("1")
                              .font(.largeTitle)
                      }
                  }
              }
  
              //            Text("Game On")
  
              VStack {//Opponent Triangle
                  HStack {
                      VStack {
                  Button(action: {}) {
                              Text("1")
                                  .font(.largeTitle)
                          }
                          HStack {
                  Button(action: {}) {
                                  Text("2")
                                      .font(.largeTitle)
                              }
                  Button(action: {}) {
                                  Text("3")
                                      .font(.largeTitle)
                              }
                          }
                          HStack {
                              Button(action: {}) {
                                  Text("4")
                                      .font(.largeTitle)
                              }
                              Button(action: {}) {
                                  Text("5")
                                      .font(.largeTitle)
                              }
                              Button(action: {}) {
                                  Text("6")
                                      .font(.largeTitle)
                              }
                          }
                          HStack {
                              Button(action: {}) {
                                  Text("7")
                                      .font(.largeTitle)
                              }
                              Button(action: {}) {
                                  Text("8")
                                      .font(.largeTitle)
                              }
                              Button(action: {}) {
                                  Text("9")
                                      .font(.largeTitle)
                              }
                              Button(action: {}) {
                                  Text("10")
                                      .font(.largeTitle)
                              }
                          }
                      }
                  }
  
  
              }// Ending Opponent Triangle verticle Stack
          }
      }
  }
  
  struct ContentView_Previews: PreviewProvider {
      static var previews: some View {
          ContentView()
      }
  }
  </code></pre>