title: Swiftui how to refresh parent view when child view closes on disappear
body: <p>I have a parent view called PostView which has a PlaceData state variable which will only contain an empty string . When you click on  the image postplace it will go to child view PlacePickerView . That view will have dynamic data from database . When you tap the Text <strong>model.PlaceName</strong> in that child view, that child view will close and we will be back in parent view . What I am trying to do is pass the value of model.PlaceName in the Child view (PlacePickerView) to PlaceData in the parent view (PostView) . The thing is that in the child view I am using   <em>@Environment(.presentationMode) var presentationMode</em> (since parent view may contain more data and I do not want to lose it by creating a new instance) to close that view and can not seem to pass data back to parent view . Any help or suggestions would be great .</p>
  <pre><code>struct PostView: View {
     @State var PlaceState = false
     @State var PlaceData = &quot;&quot;
  
      var body: some View {
      VStack {
  
              Text(PlaceData)
              .foregroundColor(.white)
              .font(.system(size: 17))
              .fontWeight(.medium)
              .padding(.bottom, 20.0)
            
                Image(&quot;postplace&quot;)
                .resizable()
                .frame(width: 24, height: 24)
                .padding(.top, 5.0)
                .onTapGesture {
                 self.PlaceState.toggle()
                 }.fullScreenCover(isPresented: $PlaceState, content: {
                   PlacePickerView()
                                 
                              })
                  }
              }
  }
  </code></pre>
  <p>The child View</p>
  <pre><code>struct PlacePickerView: View {
      @Environment(\.presentationMode) var presentationMode
      @State var model: MainModel?
      @State var tappedText1 = false
  
    var body: some View {
          VStack {
              Text(model.PlaceName) // I would like to pass value of model.PlaceName to PostView PlaceData on  when model on tapped is clicked here
                  .font(.system(size: 11))
                  .fontWeight(.semibold)
                  .frame(width: 106, height: 40)
                  .foregroundColor(.white)
                  .background(RoundedRectangle(cornerRadius: 4).stroke())
                  .background(Color(UIColor(hexString: &quot;#800000&quot;)))
                  .onTapGesture {
                      tappedText1.toggle()
                          self.presentationMode.wrappedValue.dismiss()
                  }
           }  MainViewModel().MainViewRequest(newValue) { data in
              self.model = data!
          }
         }
  
  }
  </code></pre>