Skip to content

Commit

Permalink
Fix incorrect docs. (#2820)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite authored Jan 28, 2025
1 parent 66e5615 commit 5bc7dd8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions coil-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,11 @@ Specifically, this function is only useful if you need to observe `AsyncImagePai

## Observing AsyncImagePainter.state

Example:

```kotlin
val painter = rememberAsyncImagePainter("https://example.com/image.jpg")
val state by painter.state.collectAsState()

when (painter.state) {
when (state) {
is AsyncImagePainter.State.Empty,
is AsyncImagePainter.State.Loading -> {
CircularProgressIndicator()
Expand Down

0 comments on commit 5bc7dd8

Please sign in to comment.