Skip to content

Commit

Permalink
docs: add more info about behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhr committed Jul 23, 2021
1 parent c1e5f0c commit f8a6e0b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ Even if you don't use the `tick` function, once abort request has been filed, th

## Illustrations of operating timelines

Asterisks (`*`) at the bottom of each graph indicate **_re-renders caused by `useAwaitData`_**. Note that these don't directly mean updates of the result object. Updates are indicated as vertical bars on the “status” lines.

### Case #1 — Dependencies update _before_ the first run settles

```plain
Expand All @@ -92,6 +94,7 @@ event: |<-initial call |<-deps update
run #0: |===============|<-(invalidated)===>|<-reject at tick·····>|<-(est. settle)
run #1: |==============================>|<-resolve
status: |<-running----->|<-running--------------------->|<-fulfilled--------------->
*
```

### Case #2 — Dependencies update _after_ the first run settled
Expand All @@ -102,6 +105,7 @@ event: |<-initial call |<--deps update
run #0: |================>|<-reject
run #1: |===============>|<-resolve
status: |<-running------->|<-rejected--->|<-running------>|<-fullfilled------------>
* *
```

### Case #3 — Dependencies update _after_ the first run aborted but tick isn't used
Expand All @@ -112,4 +116,5 @@ event: |<-initial call |<-abort |<-deps update |<-abort (ign
run #0: |================|<-(abort requested but no tick)====>|<-resolve (ignored)
run #1: |============>|<-resolve
status: |<-running------>|<-aborted--->|<-running--->|<-fulfilled------------------>
* *
```

0 comments on commit f8a6e0b

Please sign in to comment.