title: Implementing CoreData in SwiftUI with a popOver
body: <p>I have poured over this for hours and I can say with 99% certainty that I know what is breaking but I don't know why or how to fix it.</p>
  <pre><code>    @State private var timeSet = false {
          willSet {
              if newValue {
                  flyingHours = timeMachine.calculateTotalFlightHours()
              }
          }
      }
  </code></pre>
  <p>The code above stops working when I use
  <code>AddSortie().environment(\.managedObjectContext, self.moc)</code>
  with the button to trigger the popover.  <strong>timeSet</strong> never becomes true, or if it does it very quickly resets to false.<br/>
  However, by leaving off the .environment
  <code>AddSortie()</code>
  <strong>timeSet</strong> does become true at the appropriate time and the app works as expected... Except without .environmtnt I can not save to CoreData.<br/>
  Any ideas?<br/>
  For what it's worth I am working in XCode 12 Beta 2<br/>
  Thanks</p>