title: How to keep reference of data when using ObservableObject
body: <p>I am new to Swiftui and I struggle to understand how to properly retain data created in ObservableObject when rendering views? Or a completely different approach to the problem maybe?</p>
  
  <p>More specifically, it is about getting HTTP data in each row in a List().</p>
  
  <p>Right now, it makes the HTTP call far too often when parent views are rendered, which causes all rows to be reloaded.</p>
  
  <p>The same issue can be found here: <a href="https://stackoverflow.com/questions/58241359/keep-reference-on-view-data-model-after-view-update">Keep reference on view/data model after View update</a></p>
  
  <pre><code>public class VideoFetcher: ObservableObject {
      @Published var video: VideoResponse?
      @Published var coverImage: UIImage?
      @Published var coverImageLoading = false
      @Published var categories: String?
      @Published var loading = false
      @Published var error = false
  
      func load(mediaItemSlug: String = "", broadcasterSlug: String = "") {
          self.loading = true
  
          Video.findBySlug(
              mediaItemSlug: mediaItemSlug,
              broadcasterSlug: broadcasterSlug,
              successCallback: {video -&gt; Void in                
                  self.video = video
                  self.loading = false
  
                  self.setCategories()
                  self.loadCoverImage()
              },
              errorCallback: {(error, _) -&gt; Void in
                  self.loading = false
                  self.error = true
              })
      }
  
      func loadCoverImage() {
          guard self.video!.coverImageUrl != "" else {
              return
          }
  
          self.coverImageLoading = true
  
          let downloader = ImageDownloader()
          let urlRequest = URLRequest(url: URL(string: self.video!.coverImageUrl)!)
          let filter = AspectScaledToFillSizeFilter(size: CGSize(width: 520.0, height: 292.499999963))
  
          downloader.download(urlRequest, filter: filter) { response in
              if case .success(let image) = response.result {
                  self.coverImage = image
                  self.coverImageLoading = false
              }
          }
      }
  
      func setCategories() {
          if (self.video!.broadcaster.categories.count &gt; 0) {
              let categoryNames = self.video!.broadcaster.categories.map { category in
                  return category.name == "" ? "(no name)" : category.name
              }
  
              self.categories = categoryNames.joined(separator: " • ");
          }
      }
  }
  
  </code></pre>
  
  <p>List() row:</p>
  
  <pre><code>struct VideoCard: View {
      @ObservedObject var fetcher = VideoFetcher()
      ...
      init() {
          // Causes reload each render
          self.fetcher.load()
      }
  
      var body: some View {
          ...
          .onAppear {
              // Loads that on appear but fetcher.video is nil after view re-rendered because load() wasn't called
              self.fetcher.load()
          }
      }
  }
  </code></pre>