Skip to content

Commit

Permalink
docs: (ListState) update docs replacing obsolete method
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpinedam committed Jan 9, 2025
1 parent bed6b54 commit 3cc7487
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions doc/Learn/Mvux/ListStates.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,12 @@ public async ValueTask TrimAll(CancellationToken ct = default)
}
```

Another overload is `UpdateAsync`, which allows you to apply an update on items that match a criteria. The `match` predicate is checked for each item. It the item matches the criteria, the updater is invoked which returns a new instance of the item with the update applied:
Another overload is `UpdateAllAsync`, which allows you to apply an update on items that match a criteria. The `match` predicate is checked for each item. It the item matches the criteria, the updater is invoked which returns a new instance of the item with the update applied:

```csharp
public async ValueTask TrimLongNames(CancellationToken ct = default)
{
await MyStrings.UpdateAsync(
await MyStrings.UpdateAllAsync(
match: item => item?.Length > 10,
updater: item => item.Trim(),
ct: ct);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json.Linq;
using Uno.Extensions.Equality;
using Uno.Extensions.Reactive.Testing;
using KeyAttribute = Uno.Extensions.Equality.KeyAttribute;

Expand Down

0 comments on commit 3cc7487

Please sign in to comment.