Skip to content

Commit

Permalink
fix missing code block in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
BrentMifsud committed Sep 2, 2022
1 parent e688c64 commit 9876635
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ Task 1 Value: New Value

`AsyncValue` can be adapted to work seamlessly with `ObservableObject` with a single line of code:

```swift
class MyObservableObject: ObservableObject {
@AsyncValue var myValue: String = "Test" {
// IMPORTANT: you must use `willSet` as that is what `@Published` uses under the hood
willSet { objectWillChange.send() }
}
}
```

0 comments on commit 9876635

Please sign in to comment.