title: Core Data object binding values - cannot find '$item' in scope
body: <p>I'm trying to bind a text field value to a core data object and I am getting a <code>Cannot find '$draft' in scope</code> error. I've tried moving the <code>draft</code> declaration out of <code>body</code>, adding <code>@State let</code> and <code>@State var</code> to the declaration as well, only to get another error thrown at me saying I can't use property wrappers on local properties.</p>
  <p>Is there a correct way to do this?</p>
  <pre><code>struct AddItemView: View {
    @Environment(\.managedObjectContext) var moc
    @Environment (\.presentationMode) var presentationMode
                
    var body: some View {
      @State let draft = Item(context: moc)
  
      NavigationView {
        HStack {
          TextField(&quot;Title&quot;, text: $draft.title)
        }
      }
      .navigationTitle(Text(&quot;Add an Item&quot;))
    }
  }
  </code></pre>