title: Learning to data between parent and child views in swiftui
body: <p>I have my parent view where I'm setting my <code>States</code> and I have two different views I'm trying to pass data between.  When subview_1 calls subview_2 I'm not getting the <code>binding data</code>, the compiler fails with the error, <code>The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions.</code></p>
  <p>My parent view I've set the states</p>
  <pre><code>@State var businessPhone = &quot;&quot;
  @State var businessRating = 0.0
  </code></pre>
  <p>In subview_1 I have my bindings set and the data works fine.</p>
  <pre><code>struct subview_1: View {
  
      @Binding var businessRating: Double
      @Binding var businessPhone: String
  
      var body: some View {
      ....
      }
  }
  </code></pre>
  <p>When I call subview_2 from subview_1 the data isn't getting passed as expected.</p>
  <pre><code>struct subview_1: View {
  
      @Binding var businessRating: Double
      @Binding var businessPhone: String
  
      var body: some View {
          subview_2(businessRating: $businessRating, businessPhone: $businessPhone)
      }
  }
  </code></pre>
  <p>If I use <code>.constant()</code> with data that works as expected.</p>
  <p>For <code>subview_2</code> I have the following bindings set</p>
  <pre><code>@Binding var businessRating: Double
  @Binding var businessPhone: String
  </code></pre>