title: SwiftUI: Displaying slider position in a seperate label
body: <p>This question is a bit of a follow on from <a href="https://stackoverflow.com/questions/56725084/swiftui-how-to-get-continuous-updates-from-slider">SwiftUI: How to get continuous updates from Slider</a></p>
  
  <p>Basically I have a slider which is one of a number of sliders. Each on changes a parameter on a model class so I'm passing in a binding which represents a specific property on the model class. This works in that the model gets the new value each time the slider moves.</p>
  
  <pre class="lang-swift prettyprint-override"><code>struct AspectSlider: View {
  
      private var value: Binding&lt;Double&gt;
  
      init(value: Binding&lt;Double&gt;, hintKey: String) {
          self.value = value
      }
  
      var body: some View {
          VStack(alignment: .trailing) {
              Text("\(self.value.value)")
              Slider(value: Binding&lt;Double&gt;(getValue: { self.value.value }, setValue: { self.value.value = $0 }),
                      from: 0.0, through: 4.0, by: 0.5)
          }
      }
  }
  </code></pre>
  
  <p>What isn't working correctly is the <code>Text("\(self.value.value)")</code> display which is meant to show the current value of the slider. It's not updating when the <code>Binding&lt;Double&gt;</code> value changes. </p>
  
  <p>Instead it only updates when something else on the display triggers a display refresh. In my case the label that represents the result of the calculating performed by the model (which doesn't necessarily change when a slider changes it's value). </p>
  
  <p>I've confirmed that the model is getting changes so the binding is updating. My question is why is the Text label not updating immediately. </p>