title: Environment variable not passed to Subviews
body: <p>I want to get started with Core Data &amp; SwiftUI and therefore created a new watchOS project using the latest Xcode 11.1 GM.</p>
  <p>Then, I copied both <code>persistentContainer</code> &amp; <code>saveContext</code> from a fresh iOS project (with Core Data enabled), to gain Core Data capabilities.</p>
  <p>After that I modified the <code>HostingController</code> to return <code>AnyView</code> and set the variable in the environment.</p>
  <pre><code>class HostingController: WKHostingController&lt;AnyView&gt; {
      override var body: AnyView {
          
          let managedObjectContext = (WKExtension.shared().delegate as! ExtensionDelegate).persistentContainer.viewContext
          
  
          return AnyView(ContentView().environment(\.managedObjectContext, managedObjectContext))
      }
  }
  </code></pre>
  <p>Now I can access the context inside the <code>ContentView</code>, <strong>but not in its sub views</strong>.<br />
  But thats not how it is intended to be? As far as I know, all sub views should inherit its environment from its super views, right?</p>
  <p>Right now, to access it inside its sub views I simply set the environment variables again, like this:</p>
  <h1>ContentView.swift</h1>
  <pre><code>NavigationLink(destination: ProjectsView().environment(\.managedObjectContext, managedObjectContext)) {
      HStack {
          Image(systemName: &quot;folder.fill&quot;)
          Text(&quot;Projects&quot;)
      }
  }
  </code></pre>
  <p>Once I remove the .environment() parameter inside ContentView, the App will crash, because there is no context loaded?!</p>
  <p>The error message is <code>Context in environment is not connected to a persistent store coordinator: &lt;NSManagedObjectContext: 0x804795e0&gt;</code>.</p>
  <h1>ProjectsView.swift</h1>
  <pre><code>struct ProjectsView: View {
      @Environment(\.managedObjectContext) var managedObjectContext
      [...]
  }
  </code></pre>
  <p>But again, that can't be right? So, whats causing the error here?</p>