title: How to Update NSDiffableDataSourceSnapshot Item
body: <p>I'm using a UITableViewDiffableDataSource with my UITableView and it works as expected. However I'm having trouble updating an item in the snapshot. I have a simple sample where;</p>
  <pre><code>enum Section {
      case one
  }
  
  struct Item: Hashable {
      let identifier: Int
      let text: String
  
      public func hash(into hasher: inout Hasher) {
          hasher.combine(identifier)
      }
  
      public static func == (lhs: Item, rhs: Item) -&gt; Bool {
          return lhs.identifier == rhs.identifier
      }
  }
  </code></pre>
  <p>with the initial snapshot created using</p>
  <pre><code>        var snapshot = NSDiffableDataSourceSnapshot&lt;Section, Item&gt;()
          snapshot.appendSections([.one])
          snapshot.appendItems([
              Item(identifier: 1, text: &quot;One&quot;),
              Item(identifier: 2, text: &quot;Two&quot;),
              Item(identifier: 3, text: &quot;Three&quot;)
          ])
  
          dataSource.apply(snapshot)
  </code></pre>
  <p>If I were to attempt updating an item using</p>
  <pre><code>        var snapshot = dataSource.snapshot()
  
          snapshot.reloadItems([
              Item(identifier: 2, text: &quot;Foo&quot;)
          ])
  
          dataSource.apply(snapshot)
  </code></pre>
  <p>nothing happens. My expected result is for the <code>text</code> of item with <code>identifier</code> = 2 to be updated to &quot;Foo&quot;. Note I have not included the table view cell provider code here.</p>
  <p>I have read similar posts such as
  <a href="https://stackoverflow.com/questions/60180412/how-to-update-a-table-cell-using-diffable-uitableview">How to update a table cell using diffable UITableView</a>
  and
  <a href="https://stackoverflow.com/questions/61073340/can-uitableviewdiffabledatasource-detect-an-item-changed">Can UITableViewDiffableDataSource detect an item changed?</a>
  but the answer isn't clearly obvious.</p>