title: Creating a new NSManagedObject as a binding for a newly presented view creates an infinite loop of NSManagedObjects
body: <p>I'm trying to set up a modal view in SwiftUI that can be used both to create new objects (assignments, in this context) and edit existing ones. To edit an assignment, I simply pass that assignment to the view as an observed object. I thought it would be simple to also use this view to create new assignments by creating a new assignment in the context while I'm calling the view, like so:</p>
  
  <p><code>AssignmentEditorView(assignment: Assignment(context: self.context))</code></p>
  
  <p>The view loads just fine but is super laggy and slow. It's been infinitely creating new assignment objects in the context until I close the modal presentation. Does anyone know why this is happening and how I could fix it? </p>
  
  <p>I want to have the view create a new assignment as it appears and have that new assignment act as the <code>@ObservedObject var assignment: Assignment</code> property of the view.</p>
  
  <p>Edit: Here is the code in context. The sheet is presented on top of the master view when the user taps an "add" button.</p>
  
  <pre><code>Button(action: {
      self.newAssignmentViewIsPresented = true
  }) {
      Image(systemName: "plus")
           .font(.title)
  }
      .sheet(isPresented: $newAssignmentViewIsPresented) {
          AssignmentEditorView(assignment: Assignment(context: self.context))
          .environment(\.managedObjectContext, self.context)
      })
  </code></pre>