title: Is there a way to share a Swift state between separate files?
body: <p>Is there a way to share a Swift state between separate files? I've tried:</p>
  <pre class="lang-swift prettyprint-override"><code>public struct VideoPlayerControlsView : View {
      @State public var playerPaused : Bool = true
      // More Code Here
  }
  </code></pre>
  <p>And would like to reference this in another file (where the two are linked, so I can change one and the other would reflect this change), I think that it would be achieved by a Binding:</p>
  <pre class="lang-swift prettyprint-override"><code>struct VideoView: View {
      @Binding var videoPos : Double
      
      //more code here
  }
  </code></pre>
  <p>But then I'm told: <code>'init(videoPos)' declared here'</code> alongside that I should change:
  <code>PlaygroundPage.current.setLiveView(VideoView())</code> to <code>PlaygroundPage.current.setLiveView(VideoView(videoPos: &lt;#Binding&lt;Double&gt;#&gt;))</code> but not sure what to set the place holder value to, I also don't think this is the right way to do what I'm trying to achieve?</p>
  <p>How can I do this?</p>
  <p>NOTE:
  I'm using Swift Playgrounds on Mac</p>