title: Update Binding in UIViewRepresentable
body: <p>I have a swiftUI view that calls a UIViewRepresentable view. In the SwiftUI view I am toggling the state of @State boolean value.</p>
  <p>In my UIViewRepresentable view I have created a binding that gets past from the main SwiftUI view. The problem is the binding never gets update or at least the updateView function is not getting called in the UIViewRepresentable view. I fell like I must be doing something wrong but I am just overlooking it. Here is an example of what I am trying to do.</p>
  <pre><code>  import Foundation
    import SwiftUI
  
   struct BindingTest: UIViewRepresentable {
  
  @Binding var status: Bool
  
  
  func makeUIView(context: Context) -&gt; UIActivityIndicatorView {
      
      let activityIndicator = UIActivityIndicatorView()
      
      activityIndicator.style = .large
      
      return activityIndicator
  }
  
  func updateUIView(_ uiView: UIViewType, context: Context) {
      
      
      print(&quot;Hello&quot;)
      
  }
  
  }
  
  
  
   import SwiftUI
  
   struct ChartView: View {
  
  @State var status = false
  
  var body: some View {
  
      
      VStack{
          
          Spacer()
      
      Button(action: {
          
         status = !status
          
      }) {
          
          Text(&quot;Change&quot;)
          
      }
  
      BindingTest(status: $status)
      
      
          
      }
  }
  }
  </code></pre>
  <p>I am using Xcode 12.5 and Swift 5.4</p>